Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mutiple socket connection issue

kinson joy
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?



  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic