wood burning stoves 2.0*
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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "mutiple socket connection issue" Watch "mutiple socket connection issue" New topic
Author

mutiple socket connection issue

kinson joy
Greenhorn

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?

Thanks,

Kinson

 
Consider Paul's rocket mass heater.
 
subject: mutiple socket connection issue