• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting 2 threads to talk and tell the other when one closes

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is the same program as another thread, but I have come across a new issue and be hard to see that I was asking a new question, since I had announced there that I had solved an issue.
https://coderanch.com/t/693839/java/Java-Socket-Asynchronous-Chat <---The previous thread

When I go to end the chat with the exit command, for example i type it into the server, only the server write and the client read close, but the other 2 don't close. I need all 4 to close and end the chat. It closes the sockets, but not sure how to end the other threads at the same exact time.

here is the code












 
reply
    Bookmark Topic Watch Topic
  • New Topic