From: carlsonj@workingcode.com
To: linux-ppp@vger.kernel.org
Subject: Re: Socket doesn't get EOF
Date: Tue, 16 Nov 2004 20:49:15 +0000 [thread overview]
Message-ID: <16794.26571.241400.772818@carlson.workingcode.com> (raw)
In-Reply-To: <41998875.2020305@blazemail.com>
K-sPecial writes:
> Hey, i've got an irc bot of over 3000 lines of perl. I test for EOF on
> occasion and do a reconnect if eof is detected. This works greatly for
> instances as when the socket times out or is disconnected in most
> manors. It doesn't although register an eof when pppd dies. I realy
> don't know if this might be specific to perl or if even in C this is an
> issue.
This is a frequently-asked question about TCP/IP.
No, you won't get EOF. No, it's not a bug. It's a feature, and it's
by design. The TCP layer sees IP as a connectionless datagram
service, and tries its best to deliver the data the application
provides. IP sees the datalink layers as unrelated to any particular
transport, so when a datalink layer goes down, the transport (such as
TCP) isn't involved. If IP can route around the problem, it does so.
If it can't, it drops the packets and hopes that either (A) the link
comes back 'soon' or (B) the transport gives up eventually.
If you want a shorter timeout, set a timer in your application.
--
James Carlson <carlsonj@workingcode.com>
next prev parent reply other threads:[~2004-11-16 20:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-16 4:56 Socket doesn't get EOF K-sPecial
2004-11-16 20:49 ` carlsonj [this message]
2004-11-16 22:59 ` K-sPecial
2004-11-17 11:43 ` carlsonj
2004-11-17 23:41 ` K-sPecial
2004-11-18 12:04 ` James Carlson
2004-11-18 18:06 ` K-sPecial
2004-11-18 18:30 ` James Carlson
2004-11-18 18:54 ` K-sPecial
2004-11-18 19:29 ` James Carlson
2004-11-18 21:07 ` K-sPecial
2004-11-18 21:11 ` K-sPecial
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16794.26571.241400.772818@carlson.workingcode.com \
--to=carlsonj@workingcode.com \
--cc=linux-ppp@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).