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 int
private static final int
(package private) final Map
static final int
private static final boolean
private long
private BloomFilter
private long
(package private) final IncomingConnectionManager
private long
(package private) static boolean
(package private) static final LogIDs
private static final boolean
private boolean
(package private) static int
private final NetworkGlue
private int
(package private) int
private int
private int
(package private) final Map
private UDPSelector
private int
private int
static final int
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
accept
(int local_port, InetSocketAddress remote_address, UDPConnection connection) protected int
protected UDPSelector
protected void
checkThreadDeath
(boolean connections_running) void
connectOutbound
(UDPTransport udp_transport, InetSocketAddress address, byte[][] shared_secrets, ByteBuffer initial_data, Transport.ConnectListener listener) void
failed
(UDPConnectionSet set) int
protected void
logStats()
protected void
poll()
protected boolean
rateLimitIncoming
(InetSocketAddress s_address) void
receive
(int local_port, InetSocketAddress remote_address, byte[] data, int data_length) protected UDPConnection
registerOutgoing
(UDPTransportHelper helper) void
remove
(UDPConnectionSet set, UDPConnection connection) int
send
(int local_port, InetSocketAddress remote_address, byte[] data) protected void
protected boolean
trace()
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:
receive
in interfaceNetworkGlueListener
-
rateLimitIncoming
-
send
- Throws:
IOException
-
accept
-
allocationConnectionID
protected int allocationConnectionID() -
timeoutDeadKeys
protected void timeoutDeadKeys() -
logStats
protected void logStats() -
trace
protected boolean trace() -
trace
-