Use of 'keepalive' with Open Transport
Use of 'keepalive' with Open Transport
- Subject: Use of 'keepalive' with Open Transport
- From: Dave Rehring <email@hidden>
- Date: Tue, 11 Jan 2005 18:51:01 -0800
Note, this is related to using Open Transport on MacOS 9...
I'm working on code to notice when a connection goes down, using the
PowerPlant networking framework in conjunction with OpenTransport. The
traffic over the connection is intermittent, where neither the server nor
the client will communicate until there is something to send.
So, I enabled the tcp/keepalive option within OpenTransport.
I'm using code similar to what's in the OT Virtual Server code, except the
time constant is set to '2' instead of 30000, which seems to better match
the constants in the OT headers which indicate the value is in minutes,
rather than milliseconds, and from Ethereal network logs, the server sends
out an 'ack' packet about every 2 minutes [for me, about 113 seconds].
However, I can't figure out how to tell that we haven't received an
acknowledgement from the client, indicating that the connection is still up.
>From testing, if I:
-enable keepalive support
-establish the TCP connection
-physically disconnect the client computer from the network [by unplugging
the cable
-force-quit the client app
-re-connect the client computer to the network
Once I reconnect the client computer, the next 'ack' packet the server sends
out, is then responded to by OT on the client machine with a reset packet,
and then my server app is notified that the connection is closed.
I've searched both my archive of the old opentransport mailing list and
macnetworking,
How can I tell if the client isn't responding to the 'keepalive' messages
[ie, how would OT notify me that it's not getting a reply from the client].
Or, am I completely mistaken and should be doing this some other way?
Later,
--
David Rehring Psychos do not explode when light hits
VP of Research and Development them, no matter how crazy they are...
Atimi Software, Inc.
www.atimi.com And totally insane guy!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden