public class LLCReliableHandler extends PacketHandler
lowerHandler
Constructor and Description |
---|
LLCReliableHandler(PacketHandler handler) |
Modifier and Type | Method and Description |
---|---|
boolean |
isPacketAvailable()
Check if a packet is available.
|
int |
receivePacket(byte[] buffer)
Receive a packet.
|
void |
reset()
Reset sequence numbers.
|
boolean |
sendPacket(byte[] packet,
int len)
Send a packet.
|
close, getError, isAckAvailable, open, receiveAck, setListen
public LLCReliableHandler(PacketHandler handler)
public void reset()
reset
in class PacketHandler
public boolean sendPacket(byte[] packet, int len)
sendPacket
in class PacketHandler
packet
- the bytes to sendlen
- the number of bytes to sendpublic int receivePacket(byte[] buffer)
receivePacket
in class PacketHandler
buffer
- the buffer to receive the packet intopublic boolean isPacketAvailable()
isPacketAvailable
in class PacketHandler