linux-ppp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: K-sPecial <spam@blazemail.com>
To: linux-ppp@vger.kernel.org
Subject: Re: Socket doesn't get EOF
Date: Thu, 18 Nov 2004 18:06:38 +0000	[thread overview]
Message-ID: <419CE4AE.2020705@blazemail.com> (raw)
In-Reply-To: <41998875.2020305@blazemail.com>

> Even if the interfaces are up and the modem is "on line," that doesn't
> mean that any particular host is actually reachable.  That sort of
> global knowledge just isn't knowable, except in retrospect: if the
> connection times out, then that host obviously can't be reached.

Well there the problem lies within, the script was meant to to check if 
a port was open every so often, if it's down, check if your online, then 
possibly wait again to see if it opens back up, say 10 minutes (maybe 
the computer rebooted, maybe crontab will restart it), check again if 
online, then point the hostname to a different ip and start checking if 
the old host is back up again (so I can change it back). So just 
checking if I could access the host is what I was *double* checking, of 
course I couldn't rely on just the fact that I can't reach the port, 
before updating it to a new ip.

 > That's what timeouts are for.  You can use the existing default
 > timeout provided by TCP, or (if that's too long) you can set up your
 > own timer with alarm() or similar functions.

Yup, i'm not sure but it seems the timeout optino that IO::Socket uses 
is just a connect timeout, it didn't seem to register when pppd died, 
could be wrong.

--K-sPecial

[ http://xzziroz.freeshell.org
   irc://xzziroz.dtdns.net       ]






  parent reply	other threads:[~2004-11-18 18:06 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
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 [this message]
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=419CE4AE.2020705@blazemail.com \
    --to=spam@blazemail.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).