[JDEV] How to detect server is down
jens at mooseyard.com
Mon Apr 16 11:52:37 CDT 2001
On Monday, April 16, 2001, at 01:03 AM, Glenn MacGregor wrote:
> You can use the echo. Send a message like <message
That's sort of a heavyweight way to do it. When I asked the same
question last week, the most elegant solution was to simply send a
newline to the server. If no TCP acknowlegement is received, your
network stack will tell you that the connection has closed.
Alternatively you can enable TCP keepalive mode on your socket, but
setting the time interval below the default 2 hours is a relatively new
feature and may not be supported on your system.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 848 bytes
Desc: not available
More information about the JDev