powered by Jive Software

Is there a fuction same as "select"(in c language) in java? what it is?

i want to use a thread to manage all the sockets.

we can use “select” to monitor all the sockets in c language , and i want to do the same thing in java. Because there are so many sockets connecting to my server at the same time , i can’‘t start a new thread for all the sockets. I just want to start a new thread when the socket receive a packet.So I want to know when will a packet will come to the socket, which socket the receive the packet. But i didn’'t know how to do these things in java. Is anyone so kind to tell me?

This question doesn’‘t really have anything to do with Wildfire. I would suggest that you post it in a more general community such as java.net or javalobby.org. However, one hint is to check out the NIO package in Java – that’'s the way to implement select logic on sockets.



Thank you! Matt

Because I want to develop a new IM server and have researched the wildfire for some time .I find this forum is very active .so I post my question and forget the rules. I am sorry and will not do this thing again. Thank you very much!

Message was edited by: Lv Hongliang