Class IncomingConnectionManager
java.lang.Object
com.biglybt.core.networkmanager.impl.IncomingConnectionManager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classstatic interfaceListener for byte matches.protected class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConnection(int local_port, TransportHelperFilter filter, Transport new_transport) voidaddSharedSecrets(String name, byte[][] secrets) Object[]checkForMatch(TransportHelper transport, int incoming_port, ByteBuffer to_check, boolean min_match) voidderegisterMatchBytes(NetworkManager.ByteMatcher to_remove) Remove the given byte sequence match from the registration list.protected voidintintstatic IncomingConnectionManagerbooleanisEmpty()voidregisterMatchBytes(NetworkManager.ByteMatcher matcher, IncomingConnectionManager.MatchListener listener) Register the given byte sequence matcher to handle matching against new incoming connection initial data; i.e.protected voidremoveConnection(IncomingConnectionManager.IncomingConnection connection, boolean close_as_well, String reason) voidremoveSharedSecrets(byte[][] secrets)
-
Field Details
-
LOGID
-
singleton
-
match_buffers_cow
-
match_buffers_mon
-
max_match_buffer_size
private int max_match_buffer_size -
max_min_match_buffer_size
private int max_min_match_buffer_size -
connections
-
connections_mon
-
-
Constructor Details
-
IncomingConnectionManager
protected IncomingConnectionManager()
-
-
Method Details
-
getSingleton
-
isEmpty
public boolean isEmpty() -
checkForMatch
public Object[] checkForMatch(TransportHelper transport, int incoming_port, ByteBuffer to_check, boolean min_match) -
registerMatchBytes
public void registerMatchBytes(NetworkManager.ByteMatcher matcher, IncomingConnectionManager.MatchListener listener) Register the given byte sequence matcher to handle matching against new incoming connection initial data; i.e. the first bytes read from a connection must match in order for the given listener to be invoked.- Parameters:
matcher- byte filter sequencelistener- to call upon match
-
deregisterMatchBytes
Remove the given byte sequence match from the registration list.- Parameters:
to_remove- byte sequence originally used to register
-
getMaxMatchBufferSize
public int getMaxMatchBufferSize() -
getMaxMinMatchBufferSize
public int getMaxMinMatchBufferSize() -
addConnection
-
removeConnection
protected void removeConnection(IncomingConnectionManager.IncomingConnection connection, boolean close_as_well, String reason) -
doTimeoutChecks
protected void doTimeoutChecks()
-