The Artima Developer Community
Sponsored Link

Java Answers Forum
Socket.isClosed() ??

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

Socket.isClosed() ?? Posted: Sep 14, 2003 7:39 PM
Reply to this message Reply
Advertisement
java.net.Socket has a isClosed() method which returns true if the connection has been closed. I am using this method to reuse an existing connection to a server. Basically I am checking whether socket is closed before I reopen a connection and if isClosed() method returns true only I create the new connection or else reuse the existing one.

My Question is say I am connected to a server and the server crashes, will the isClosed() method return true, or it will only return true if the connection was closed in my code?

Topic: deploying ordinary beans Previous Topic   Next Topic Topic: Problems Invoking EJBs across Servers

Sponsored Links



Google
  Web Artima.com   

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