Re: Multiple Socket connection to a single Server??
Sunday, December 8, 2002 11:10 PM
For each port you want to listen to, open a ServerSocket and call accept() which will have them waiting for incoming requests. Ideally each shd handle incoming requests by spawning threads. Don't know what you mean by "single server" - what you want is many ServerSockets (or Servers) listening on different ports to service requests differently. Maybe what you mean is single jvm (starter java program) that starts off these ServerSockets...use different threads...