site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Hello, Thanks, Michael _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com I have a network program that when used in the wild normally goes through commercially available broadband routers. The problem as I'm sure many people have had is after an unspecified and unconfigurable amount of idle time the router closes the route causing any traffic to fail. Now I know we could implement a connection tickle in the application level to be sent down the line but since OS X and darwin appeared to support TCP_KEEPALIVE why not use what is already there? :-) The only problem is that appears TCP_KEEPALIVE doesn't actually do anything. So, I have cobbled together a sample socket client and server app from others so I didn't have to write much code. :-) In the client SO_KEEPALIVE is specified and TCP_KEEPALIVE is a ridiculously low value. When using tcpdump I do not see any tickle packets. So here's what I have, a sample server and client at http:// colby.mledford.com/source/echoserv.tar.gz Feel free to download and verify...I'm testing on 10.4.8. make ./echoserv [port] tcpdump (with appropriate switches for the interface over which the client will communicate to the server) ./client hostname [port] At this point the two are connected and you should have tcpdump output... and since TCP_KEEPALIVE is set to 10 seconds you should see a packet every ten seconds... except I never do. If I were to leave the client in this state for two hours I would eventually see the packet. So i know that SO_KEEPALIVE is working but it seems TCP_KEEPALIVE affects nothing and no error is returned when setting it. Anyone have any thoughts or insight on this? Does it work in darwin? Is there something I'm missing? smime.p7s
participants (1)
-
Michael Ledford