public class IncomingPacketFilterImpl extends java.lang.Object implements IncomingPacketFilter
IncomingPacketFilter.DECODED| Constructor and Description |
|---|
IncomingPacketFilterImpl(FNPPacketMangler mangler,
Node node,
NodeCrypto crypto) |
| Modifier and Type | Method and Description |
|---|---|
static long[] |
getDecodedPackets() |
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.
|
public IncomingPacketFilterImpl(FNPPacketMangler mangler, Node node, NodeCrypto crypto)
public boolean isDisconnected(PeerContext context)
IncomingPacketFilterisDisconnected in interface IncomingPacketFilterpublic static long[] getDecodedPackets()
public IncomingPacketFilter.DECODED process(byte[] buf, int offset, int length, Peer peer, long now)
IncomingPacketFilterprocess in interface IncomingPacketFilterbuf - 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.