int local_port,
TransportHelperFilter filter )
{
SocketChannel channel = ((TCPTransportHelper)filter.getHelper()).getSocketChannel();
//set advanced socket options
try {
int so_sndbuf_size = COConfigurationManager.getIntParameter( "network.tcp.socket.SO_SNDBUF" );
if( so_sndbuf_size > 0 ) channel.socket().setSendBufferSize( so_sndbuf_size );
String ip_tos = COConfigurationManager.getStringParameter( "network.tcp.socket.IPDiffServ" );
if( ip_tos.length() > 0 ) channel.socket().setTrafficClass( Integer.decode( ip_tos ).intValue() );
}
catch( Throwable t ) {
t.printStackTrace();
}
InetSocketAddress tcp_address = new InetSocketAddress( channel.socket().getInetAddress(), channel.socket().getPort());
ConnectionEndpoint co_ep = new ConnectionEndpoint(tcp_address);
ProtocolEndpointTCP pe_tcp = (ProtocolEndpointTCP)ProtocolEndpointFactory.createEndpoint( ProtocolEndpoint.PROTOCOL_TCP, co_ep, tcp_address );