I need a way of deciding if a socket is dead, and not idle. The problem I'm having is that on my windows client if I power off the machine (or unplug the network cable) while there is a socket open between it and my unix server, the unix server can't tell the that the socket is dead as opposed to idle (nothing is sent across the socket both ways, if I were lucky enough for the windows program to crash Windows would send we a message, but if my user manages to disconnect himself/herself or unplug their ne
twork connection my server assumes they are just idle).
I've looked at using SO_KEEPALIVE, but sends acknowledgements once every 2 hours by system default and I don't want to decrease that, actually I don't want to play with the system configuration if possible. Is there any other way of doing this? Is it possible (How can the server tell the difference between a dead connection and one with a _really_ bad lag)? Does R.Stevens book cover this?
4th Year Comp Sci