public interface PacketSocketHandler extends SocketHandler
| Modifier and Type | Method and Description |
|---|---|
AddressTracker.Status |
getDetectedConnectivityStatus()
Does this port appear to be port forwarded? @see AddressTracker
|
int |
getHeadersLength()
Get the size of the transport layer headers, for byte accounting purposes.
|
int |
getHeadersLength(Peer peer)
Get the size of the transport layer headers, for byte accounting purposes.
|
int |
getMaxPacketSize()
The maximum size of a packet, not including transport layer headers
|
int |
getPacketSendThreshold()
How big must the pending data be before we send a packet? *Includes* transport layer headers.
|
void |
sendPacket(byte[] blockToSend,
Peer destination,
boolean allowLocalAddresses)
Send a block of encoded bytes to a peer.
|
void |
setLowLevelFilter(IncomingPacketFilter f)
Set the decryption filter to which incoming packets will be fed
|
int getMaxPacketSize()
void sendPacket(byte[] blockToSend,
Peer destination,
boolean allowLocalAddresses)
throws Peer.LocalAddressException
blockToSend - The data block to send.destination - The peer to send it to.Peer.LocalAddressExceptionint getHeadersLength()
int getHeadersLength(Peer peer)
peer - used to detect address family.void setLowLevelFilter(IncomingPacketFilter f)
int getPacketSendThreshold()
AddressTracker.Status getDetectedConnectivityStatus()