File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes mutiple socket connection issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "mutiple socket connection issue" Watch "mutiple socket connection issue" New topic

mutiple socket connection issue

kinson joy

Joined: Dec 19, 2011
Posts: 1
Hi I have server code:

And client socket is connected to server and loop to send message to server, at end of each loop to close socket:

The problem is server can only receive message at first loop, then it cannot get any message after other ones.

At the server side, if we don't set running as false when capture socket close ( which mean keep first thread alive), then work fine, at this case, server will increase number of thread if there are a lot of client to connect? how to solve this issue?



I agree. Here's the link:
subject: mutiple socket connection issue
It's not a secret anymore!