Class IncomingConnectionManager
java.lang.Object
com.biglybt.core.networkmanager.impl.IncomingConnectionManager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
static interface
Listener for byte matches.protected class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addConnection
(int local_port, TransportHelperFilter filter, Transport new_transport) void
addSharedSecrets
(String name, byte[][] secrets) Object[]
checkForMatch
(TransportHelper transport, int incoming_port, ByteBuffer to_check, boolean min_match) void
deregisterMatchBytes
(NetworkManager.ByteMatcher to_remove) Remove the given byte sequence match from the registration list.protected void
int
int
static IncomingConnectionManager
boolean
isEmpty()
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.protected void
removeConnection
(IncomingConnectionManager.IncomingConnection connection, boolean close_as_well, String reason) void
removeSharedSecrets
(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()
-