|
Boost Users : |
Subject: [Boost-users] [asio] Detecting tcp peer disconnection
From: Igor R (boost.lists_at_[hidden])
Date: 2010-01-28 10:30:08
Hello,
This issue has previously been discussed in details, and IIRC, the
conclusion was that the reliable method to detect peer disconnection
is to try reading from the socket.
Now I encountered strange situation: I connect tcp socket to some
proprietry server, then pull out the ethernet cable from the server
side. If async_read_some was in progress - nothing happens, no handler
is called. If I start an additional async_read_some - nothing happens.
I tried to set SO_KEEPALIVE option and waited - nothing happened.
My machine runs WinXPSP3, so async_read_some is delegated to WSARecv().
I'd appreciate any idea on the subj.
Thanks.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net