Class UDPConnectionManager

    • Field Detail

      • LOGID

        static final LogIDs LOGID
      • LOG

        static boolean LOG
      • max_outbound_connections

        static int max_outbound_connections
      • THREAD_LINGER_ON_IDLE_PERIOD

        public static final int THREAD_LINGER_ON_IDLE_PERIOD
        See Also:
        Constant Field Values
      • DEAD_KEY_RETENTION_PERIOD

        public static final int DEAD_KEY_RETENTION_PERIOD
        See Also:
        Constant Field Values
      • connection_sets

        final java.util.Map connection_sets
      • recently_dead_keys

        final java.util.Map recently_dead_keys
      • next_connection_id

        private int next_connection_id
      • idle_start

        private long idle_start
      • incoming_bloom_create_time

        private long incoming_bloom_create_time
      • last_incoming

        private long last_incoming
      • rate_limit_discard_packets

        private int rate_limit_discard_packets
      • rate_limit_discard_bytes

        private int rate_limit_discard_bytes
      • setup_discard_packets

        private int setup_discard_packets
      • setup_discard_bytes

        private int setup_discard_bytes
      • outbound_connection_count

        volatile int outbound_connection_count
      • max_conn_exceeded_logged

        private boolean max_conn_exceeded_logged
    • Constructor Detail

      • UDPConnectionManager

        protected UDPConnectionManager()
    • Method Detail

      • connectOutbound

        public void connectOutbound​(UDPTransport udp_transport,
                                    java.net.InetSocketAddress address,
                                    byte[][] shared_secrets,
                                    java.nio.ByteBuffer initial_data,
                                    Transport.ConnectListener listener)
      • getMaxOutboundPermitted

        public int getMaxOutboundPermitted()
      • checkThreadCreation

        protected UDPSelector checkThreadCreation()
      • checkThreadDeath

        protected void checkThreadDeath​(boolean connections_running)
      • poll

        protected void poll()
      • receive

        public void receive​(int local_port,
                            java.net.InetSocketAddress remote_address,
                            byte[] data,
                            int data_length)
        Specified by:
        receive in interface NetworkGlueListener
      • rateLimitIncoming

        protected boolean rateLimitIncoming​(java.net.InetSocketAddress s_address)
      • send

        public int send​(int local_port,
                        java.net.InetSocketAddress remote_address,
                        byte[] data)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • accept

        protected void accept​(int local_port,
                              java.net.InetSocketAddress remote_address,
                              UDPConnection connection)
      • allocationConnectionID

        protected int allocationConnectionID()
      • timeoutDeadKeys

        protected void timeoutDeadKeys()
      • logStats

        protected void logStats()
      • trace

        protected boolean trace()
      • trace

        protected void trace​(java.lang.String str)