Class UDPConnectionManager
java.lang.Object
com.biglybt.core.networkmanager.impl.udp.UDPConnectionManager
- All Implemented Interfaces:
NetworkGlueListener
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final int(package private) final Mapstatic final intprivate static final booleanprivate longprivate BloomFilterprivate long(package private) final IncomingConnectionManagerprivate long(package private) static boolean(package private) static final LogIDsprivate static final booleanprivate boolean(package private) static intprivate final NetworkGlueprivate int(package private) intprivate intprivate int(package private) final Mapprivate UDPSelectorprivate intprivate intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaccept(int local_port, InetSocketAddress remote_address, UDPConnection connection) protected intprotected UDPSelectorprotected voidcheckThreadDeath(boolean connections_running) voidconnectOutbound(UDPTransport udp_transport, InetSocketAddress address, byte[][] shared_secrets, ByteBuffer initial_data, Transport.ConnectListener listener) voidfailed(UDPConnectionSet set) intprotected voidlogStats()protected voidpoll()protected booleanrateLimitIncoming(InetSocketAddress s_address) voidreceive(int local_port, InetSocketAddress remote_address, byte[] data, int data_length) protected UDPConnectionregisterOutgoing(UDPTransportHelper helper) voidremove(UDPConnectionSet set, UDPConnection connection) intsend(int local_port, InetSocketAddress remote_address, byte[] data) protected voidprotected booleantrace()protected void
-
Field Details
-
LOGID
-
LOOPBACK
private static final boolean LOOPBACK- See Also:
-
FORCE_LOG
private static final boolean FORCE_LOG- See Also:
-
LOG
static boolean LOG -
max_outbound_connections
static int max_outbound_connections -
TIMER_TICK_MILLIS
public static final int TIMER_TICK_MILLIS- See Also:
-
THREAD_LINGER_ON_IDLE_PERIOD
public static final int THREAD_LINGER_ON_IDLE_PERIOD- See Also:
-
DEAD_KEY_RETENTION_PERIOD
public static final int DEAD_KEY_RETENTION_PERIOD- See Also:
-
STATS_TIME
public static final int STATS_TIME- See Also:
-
STATS_TICKS
public static final int STATS_TICKS- See Also:
-
connection_sets
-
recently_dead_keys
-
next_connection_id
private int next_connection_id -
incoming_manager
-
network_glue
-
selector
-
protocol_timer
-
idle_start
private long idle_start -
BLOOM_RECREATE
private static final int BLOOM_RECREATE- See Also:
-
BLOOM_INCREASE
private static final int BLOOM_INCREASE- See Also:
-
incoming_bloom
-
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 Details
-
UDPConnectionManager
protected UDPConnectionManager()
-
-
Method Details
-
connectOutbound
public void connectOutbound(UDPTransport udp_transport, InetSocketAddress address, byte[][] shared_secrets, ByteBuffer initial_data, Transport.ConnectListener listener) -
getMaxOutboundPermitted
public int getMaxOutboundPermitted() -
checkThreadCreation
-
checkThreadDeath
protected void checkThreadDeath(boolean connections_running) -
poll
protected void poll() -
remove
-
failed
-
registerOutgoing
- Throws:
IOException
-
receive
- Specified by:
receivein interfaceNetworkGlueListener
-
rateLimitIncoming
-
send
- Throws:
IOException
-
accept
-
allocationConnectionID
protected int allocationConnectionID() -
timeoutDeadKeys
protected void timeoutDeadKeys() -
logStats
protected void logStats() -
trace
protected boolean trace() -
trace
-