class="java" name="code"> SocketChannel sc = SocketChannel.open(); sc.socket().setReuseAddress(true); sc.socket().setKeepAlive(true); sc.configureBlocking(false); InetSocketAddress ia = new InetSocketAddress(_hostName, _portNum); sc.connect(ia);