The Artima Developer Community
Sponsored Link

Java Answers Forum
How this is possible?

4 replies on 1 page. Most recent reply: Sep 15, 2003 6:42 PM by Senthoorkumaran Punniamoorthy

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 4 replies on 1 page
Senthoorkumaran Punniamoorthy

Posts: 335
Nickname: senthoor
Registered: Mar, 2002

How this is possible? Posted: Sep 14, 2003 11:16 PM
Reply to this message Reply
Advertisement
if (mySocket != null){
      logger.log(Level.FINEST,"Connection Status" + mySocket.isClosed() + mySocket.isConnected());
    }

When I see the log isClosed() and isConnected() are both returning true??? Anybody has an explanation for this?


mausam

Posts: 243
Nickname: mausam
Registered: Sep, 2003

Re: How this is possible? Posted: Sep 15, 2003 2:24 AM
Reply to this message Reply
Are you closing your IO streams before you close the socket

Senthoorkumaran Punniamoorthy

Posts: 335
Nickname: senthoor
Registered: Mar, 2002

Re: How this is possible? Posted: Sep 15, 2003 3:03 AM
Reply to this message Reply
IO Streams are closed after every read/write.

mausam

Posts: 243
Nickname: mausam
Registered: Sep, 2003

Re: How this is possible? Posted: Sep 15, 2003 6:35 AM
Reply to this message Reply
may be this can be helpful for u
http://forum.java.sun.com/thread.jsp?thread=420077&forum=31&message=1862016

Senthoorkumaran Punniamoorthy

Posts: 335
Nickname: senthoor
Registered: Mar, 2002

Re: How this is possible? Posted: Sep 15, 2003 6:42 PM
Reply to this message Reply
I think I have to come up my own way of checking whether a socket is closed. I thought there would be an API method but there seems no such method available.

Thanx for the pointer

Flat View: This topic has 4 replies on 1 page
Topic: How do I save an array list of serialized objects? Previous Topic   Next Topic Topic: chatting program

Sponsored Links



Google
  Web Artima.com   

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