This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
sorry, that two port numbers(1999 and 2999) are serversocket(1999) and serversocket(2999) listening on the port numbers.
how to check which client socket is coming in server side. if more than one client socket are coming how to handle?
how to test these condition using if or any other?
what methods are available.
Joined: Mar 22, 2005
As I said, the client socket is meaningless to the server. The client doesn't get to choose which socket is used. I really think you should work through the tutorial I linked to; it explains how a ServerSocket can handle multiple clients.
subject: Can we use two ServerSocket in a single program?