| And, you'd still want the case of a physical failure (i.e., the machine on
the other end got power cycled or crashed, or a component of the intervening
network failed), and there's no driver or parent process which can tell you
what happened in that case...
Webb
|
| > And, you'd still want the case of a physical failure (i.e., the machine on
> the other end got power cycled or crashed, or a component of the intervening
> network failed), and there's no driver or parent process which can tell you
> what happened in that case...
Not quite true. In the case of the remote system crashing
(or network failing), this can/will be detected by the local
end of the connection.
In theory (untested by me) you should be able to get that reason via
getsockopt(SO_ERROR). On NT, the condition is reported
differently (getsockopt(SO_ERROR already returns 0 on NT),
instead from experience the recv() will fail with SOCKET_ERROR
and WSAGetLastError() will return a different error if the
network failed.
|