• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

mutiple socket connection issue

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?

Thanks,

Kinson

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic