--- "Edward J. Huff" <[EMAIL PROTECTED]> wrote: > On Wed, 2003-09-24 at 21:18, David Roden wrote: > > Niklas Bergh wrote: > > > > > Idle connections will be dropped in favor of new > incoming connections > > > as soon as there are any of those.... > > > > Isn't an idle connection killed by the IP stack > after some time anyhow? > > And I believe if a peer becomes disconnected without > the chance > to close TCP connections, they stay open until the > peer reconnects > to the network and it's TCP stack sends reset > packets. It it got > a different IP number, the connections stay open > until someone else > starts a TCP stack using that IP number.
TCP connections don't time out. It is perfectly ok to keep a connection open days in complete silence and then start sending across it again. By default though there is no traffic then, and so if one machine dies the socket will stay open on the other side. If you turn on SO_KEEPALIVE TCP will send keep alives periodically to tell you if your peer is not responding. Of coarse when you try to write to one of these dead sockets, your TCP implementation will after a few 100ms figuar out the other side isn't responding and you'll get a "connect timed out". So if you're not sure SO_KEEPALIVE works, or you have something better to send, you can send application level keep alives, which are just as good. __________________________________________________________________ Gesendet von Yahoo! Mail - http://mail.yahoo.de Logos und Klingelt�ne f�rs Handy bei http://sms.yahoo.de _______________________________________________ Devl mailing list [EMAIL PROTECTED] http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/devl
