Methods Summary |
---|
public void | clearExplicitBindAddress()
incoming_socketchannel_manager.clearExplicitBindAddress();
|
public TCPConnectionManager | getConnectDisconnectManager()Get the socket channel connect / disconnect manager. return connect_disconnect_manager;
|
public com.aelitis.azureus.core.networkmanager.VirtualChannelSelector | getReadSelector()Get the virtual selector used for socket channel read readiness. return read_selector;
|
public static com.aelitis.azureus.core.networkmanager.impl.tcp.TCPNetworkManager | getSingleton()
return( instance );
|
public int | getTCPListeningPortNumber()Get port that the TCP server socket is listening for incoming connections on. return incoming_socketchannel_manager.getTCPListeningPortNumber();
|
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.
COConfigurationManager.addAndFireParameterListener(
"TCP.Listen.Port.Enable",
new ParameterListener()
{
public void
parameterChanged(
String name )
{
TCP_INCOMING_ENABLED = TCP_OUTGOING_ENABLED = COConfigurationManager.getBooleanParameter( name );
}
});
COConfigurationManager.addAndFireParameterListeners(
new String[]{ "network.tcp.read.select.time", "network.tcp.write.select.time" },
new ParameterListener()
{
public void
parameterChanged(
String name )
{
WRITE_SELECT_LOOP_TIME = COConfigurationManager.getIntParameter( "network.tcp.write.select.time" );
READ_SELECT_LOOP_TIME = COConfigurationManager.getIntParameter( "network.tcp.read.select.time" );
}
});
return tcp_mss_size;
|
public com.aelitis.azureus.core.networkmanager.VirtualChannelSelector | getWriteSelector()Get the virtual selector used for socket channel write readiness. return write_selector;
|
public boolean | isEffectiveBindAddress(java.net.InetAddress address)
return( incoming_socketchannel_manager.isEffectiveBindAddress( address ));
|
public boolean | isTCPListenerEnabled()
return( incoming_socketchannel_manager.isEnabled());
|
public static void | refreshRates(int min_rate)
tcp_mss_size = COConfigurationManager.getIntParameter( "network.tcp.mtu.size" ) - 40;
if( tcp_mss_size > min_rate ) tcp_mss_size = min_rate - 1;
if( tcp_mss_size < 512 ) tcp_mss_size = 512;
|
public void | setExplicitBindAddress(java.net.InetAddress address)
incoming_socketchannel_manager.setExplicitBindAddress( address );
|