posted 20 years ago
I am using socket channel for communication (created as shown below). Each time i use it, i am closing by invoking socketChannel.close(). But this doesnt seem to be closing the tcp connection.
SocketChannel socketChannel = SocketChannel.open();
socketChannel.connect(new InetSocketAddress(ip, port));
socketChannel.configureBlocking(false);
Can someone sugg the right way to terminate the connection.