Class IncomingConnectionManager

java.lang.Object
com.biglybt.core.networkmanager.impl.IncomingConnectionManager

public class IncomingConnectionManager extends Object
  • Field Details

    • LOGID

      static final LogIDs LOGID
    • singleton

      private static final IncomingConnectionManager singleton
    • match_buffers_cow

      private volatile Map match_buffers_cow
    • match_buffers_mon

      private final AEMonitor 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

      private final ArrayList connections
    • connections_mon

      private final AEMonitor connections_mon
  • Constructor Details

    • IncomingConnectionManager

      protected IncomingConnectionManager()
  • Method Details

    • getSingleton

      public static IncomingConnectionManager 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 sequence
      listener - to call upon match
    • deregisterMatchBytes

      public void deregisterMatchBytes(NetworkManager.ByteMatcher to_remove)
      Remove the given byte sequence match from the registration list.
      Parameters:
      to_remove - byte sequence originally used to register
    • addSharedSecrets

      public void addSharedSecrets(String name, byte[][] secrets)
    • removeSharedSecrets

      public void removeSharedSecrets(byte[][] secrets)
    • getMaxMatchBufferSize

      public int getMaxMatchBufferSize()
    • getMaxMinMatchBufferSize

      public int getMaxMinMatchBufferSize()
    • addConnection

      public void addConnection(int local_port, TransportHelperFilter filter, Transport new_transport)
    • removeConnection

      protected void removeConnection(IncomingConnectionManager.IncomingConnection connection, boolean close_as_well, String reason)
    • doTimeoutChecks

      protected void doTimeoutChecks()