parameter "timeout" in socketchannel does not work
摘要:// Accept the connection and make it non-blocking SocketChannel socketChannel = serverSocketChannel.accept(); Socket socket = socketChannel.socket(); //socket.setSoTimeout(1000*10);//it will be timeout if idle more than 10s //after testing, i found the parameter in socket...
阅读全文
posted @
2014-02-11 10:36
silentjesse
阅读(344)
推荐(0)
The Rox Java NIO Tutorial
摘要:FQ之后访问http://rox-xmlrpc.sourceforge.net/niotut/
阅读全文
posted @
2014-01-24 11:02
silentjesse
阅读(161)
推荐(0)
when an event of selector will be fired
摘要:OP_READOperation-set bit for read operations.Suppose that a selection key's interest set contains OP_READ at the start of a selection operation. If the selector detects that the corresponding channel is ready for reading, has reached end-of-stream, has been remotely shut down for further reading
阅读全文
posted @
2014-01-24 10:52
silentjesse
阅读(291)
推荐(0)