aspose file tools
The moose likes Sockets and Internet Protocols and the fly likes mutiple socket connection issue Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply 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

 
 
subject: mutiple socket connection issue
 
Threads others viewed
client / server (communication problem...)
applet loading forever...
Qn regarding sockets in SCJD
Multithreading client socket throws Stream corrupted exception
Problem with echo server and client.
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture