The Artima Developer Community
Sponsored Link

Java Answers Forum
How a socket client can recover from Server Crash?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Senthoorkumaran Punniamoorthy

Posts: 335
Nickname: senthoor
Registered: Mar, 2002

How a socket client can recover from Server Crash? Posted: Sep 14, 2003 9:42 PM
Reply to this message Reply
Advertisement
Hi Guys,

I am trying to reuse a socket connection. My Condition before getting a new connection is
if (mySocket==null || mySocket.isClosed()){
   getNewConnection()
}else{
   return existing connection;
}


However I am worried whether if the Server crashed whether the mySocket.close() will capture that event and say that the connection has been closed. I have set the keepalive too.

Topic: Anybody can help me...? Previous Topic   Next Topic Topic: How do I save my changes to XML file?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use