On 8/16/06, Davi Arnaut <[EMAIL PROTECTED]> wrote:
The only portable way to "detect" a broken connection is using
SO_KEEPALIVE
or to write/read "ping" data through the socket -- which is what
keepalive does.

How would SO_KEEPALIVE help?  The other end is deliberately closing
the connection and we need to know that.

Would a non-blocking read() followed by a poll()/select() be useful?
We'd still get a 0 back from read() - but if it was the EOF, would the
state of the socket change to be in the 'exceptional' state then if we
repoll?  -- justin

Reply via email to