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?