wood burning stoves*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 12759
    
    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
 
 
subject: how to check whether a connection is exited?
 
Similar Threads
problem in connectivity through datasource to oracle database
nullpointer
how to maintain database using Threads
exit of an object
HTTPS Cipher Threshold