Hi! all,

In java, how to determine that an input stream (or a socket) is broken?
I use a BufferedReader (i.e. in) to read from this stream, and when
in.readline() == null, I understand the connection is broken. Does that
make sense on NT and Solaris? Or is there a better way to do that?

Is there a sample code or a way to do this?
1. Keep the socket connection open.
2. read from the input stream whenever there is new data coming in.
(3. the reading thread is blocked when there is not no new data. or at
least does not occupy big CPU time for looping)

Can anyone give me a hand? Help is needed urgently.

Thank you!
Xizhen

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to