SocketChannel createSock ( ) throws IOException { SocketChannel sock ; sock = SocketChannel . open ( ) ; sock . configureBlocking ( false ) ; sock . socket ( ) . setSoLinger ( false , - 1 ) ; sock . socket ( ) . setTcpNoDelay ( true ) ; return sock ; }
Create a SocketChannel .