To interrupt a sockect operation
SocketChannel channel = SocketChannel.open(new InetSocketAddress("localhost",8999));
try
{
in = new Scanner(channel);
while(true)
{
}
}
finally
{
channel.close();
}
Socket half close is to have client
to
socket.shutdownOuput() to close output stream
but socket still can read from input stream
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment