com.aelitis.azureus.core.networkmanager.impl.tcp
Class TCPNetworkManager

java.lang.Object
  extended by com.aelitis.azureus.core.networkmanager.impl.tcp.TCPNetworkManager

public class TCPNetworkManager
extends Object


Field Summary
static boolean TCP_INCOMING_ENABLED
           
protected static int tcp_mss_size
           
static boolean TCP_OUTGOING_ENABLED
           
 
Constructor Summary
protected TCPNetworkManager()
           
 
Method Summary
 void clearExplicitBindAddress()
           
 TCPConnectionManager getConnectDisconnectManager()
          Get the socket channel connect / disconnect manager.
 long getLastIncomingNonLocalConnectionTime()
           
 VirtualChannelSelector getReadSelector()
          Get the virtual selector used for socket channel read readiness.
static TCPNetworkManager getSingleton()
           
 int getTCPListeningPortNumber()
          Get port that the TCP server socket is listening for incoming connections on.
static int getTcpMssSize()
          Get the configured TCP MSS (Maximum Segment Size) unit, i.e.
 VirtualChannelSelector getWriteSelector()
          Get the virtual selector used for socket channel write readiness.
 boolean isEffectiveBindAddress(InetAddress address)
           
 boolean isTCPListenerEnabled()
           
static void refreshRates(int min_rate)
           
 void setExplicitBindAddress(InetAddress address)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tcp_mss_size

protected static int tcp_mss_size

TCP_INCOMING_ENABLED

public static boolean TCP_INCOMING_ENABLED

TCP_OUTGOING_ENABLED

public static boolean TCP_OUTGOING_ENABLED
Constructor Detail

TCPNetworkManager

protected TCPNetworkManager()
Method Detail

getSingleton

public static TCPNetworkManager getSingleton()

getTcpMssSize

public static int getTcpMssSize()
Get the configured TCP MSS (Maximum Segment Size) unit, i.e. the max (preferred) packet payload size. NOTE: MSS is MTU-40bytes for TCPIP headers, usually 1460 (1500-40) for standard ethernet connections, or 1452 (1492-40) for PPPOE connections.

Returns:
mss size in bytes

refreshRates

public static void refreshRates(int min_rate)

setExplicitBindAddress

public void setExplicitBindAddress(InetAddress address)

clearExplicitBindAddress

public void clearExplicitBindAddress()

isEffectiveBindAddress

public boolean isEffectiveBindAddress(InetAddress address)

getConnectDisconnectManager

public TCPConnectionManager getConnectDisconnectManager()
Get the socket channel connect / disconnect manager.

Returns:
connect manager

getReadSelector

public VirtualChannelSelector getReadSelector()
Get the virtual selector used for socket channel read readiness.

Returns:
read readiness selector

getWriteSelector

public VirtualChannelSelector getWriteSelector()
Get the virtual selector used for socket channel write readiness.

Returns:
write readiness selector

isTCPListenerEnabled

public boolean isTCPListenerEnabled()

getTCPListeningPortNumber

public int getTCPListeningPortNumber()
Get port that the TCP server socket is listening for incoming connections on.

Returns:
port number

getLastIncomingNonLocalConnectionTime

public long getLastIncomingNonLocalConnectionTime()