• Post Reply Bookmark Topic Watch Topic
  • New Topic

how can I detect liveliness of a socket connection?  RSS feed

 
Pushker Chaubey
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a server and a client. Client is obtaining messages from server through a socket and is a slow consumer of messages. When the the server is stopped, I end up getting stale messages. Please suggest a way to overcome this. Can I check from client side if the server side socket is still alive?

Thanks in advance.
 
Mike Guze
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
did you receive an exception? when a socket is closed and you are reading, you can receive an Exception. Sorry I'm mexican and I'dont write correct, sometimes.
[ June 09, 2007: Message edited by: Miguel Ivan Gutierrez ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!