Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2007

Tip: Looking for answers? Try searching our database.

UNIX select() equivalent in Java for polling multiple sockets

Thread view: 
captain_oldfield - 04 Oct 2007 00:57 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.