aspose 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
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: 12779
    
    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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to check whether a connection is exited?