
28 Jan
2010
28 Jan
'10
3:30 p.m.
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.