Hi All,
I am struggling to find any information on how Java can be made to
poll multiple sockets in a single thread. In variants of UNIX this is
simply done via the select() call.
Can anyone provide any links to tutorials/information explaining how
this is done? I did come across information on the SocketChannel &
Selector classes somewhere, but unfortunately I lost the link :( I do
remember there was something particular about version 1.4 &
onwards....
Thanks all
Arne Vajhøj - 04 Oct 2007 01:16 GMT
> I am struggling to find any information on how Java can be made to
> poll multiple sockets in a single thread. In variants of UNIX this is
[quoted text clipped - 5 lines]
> remember there was something particular about version 1.4 &
> onwards....
They keyword is nio.
There are lots of hits on Google. Including:
http://www.owlmountain.com/tutorials/NonBlockingIo.htm
http://rox-xmlrpc.sourceforge.net/niotut/index.html
http://java.sun.com/j2se/1.5.0/docs/guide/nio/example/index.html
http://www.ibm.com/developerworks/java/library/j-javaio/
Arne