public interface IncomingPacketFilter
OutgoingPacketMangler
Modifier and Type | Interface and Description |
---|---|
static class |
IncomingPacketFilter.DECODED |
Modifier and Type | Method and Description |
---|---|
boolean |
isDisconnected(PeerContext context)
Is the given connection closed?
|
IncomingPacketFilter.DECODED |
process(byte[] buf,
int offset,
int length,
Peer peer,
long now)
Process an incoming packet.
|
IncomingPacketFilter.DECODED process(byte[] buf, int offset, int length, Peer peer, long now)
buf
- The buffer to read from. Note that this may be reused later on; any
data to keep must be copied.offset
- The offset to start reading from.length
- The length in bytes to read.peer
- The peer which sent us the packet. We only know
the Peer because it's incoming; we are supposed to create
or find PeerContext's for the Message's.now
- The exact time at which the packet was received.boolean isDisconnected(PeerContext context)