File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes how to check whether a connection is exited? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "how to check whether a connection is exited? " Watch "how to check whether a connection is exited? " New topic
Author

how to check whether a connection is exited?

kahkean chor
Ranch Hand

Joined: Jan 26, 2013
Posts: 56
how to check whether a connection is exited? (socket)
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12675
    
    5
Assuming you mean when the other side of your connection has closed the socket.

For one thing, you will get an IOException when you try to write to it or read from it.

In general, see the java.net.Socket JavaDocs for methods to check state of a socket.

Bill

Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to check whether a connection is exited?
 
Similar Threads
nullpointer
problem in connectivity through datasource to oracle database
how to maintain database using Threads
exit of an object
HTTPS Cipher Threshold