timeout (or 'force-quit') for 'open socket' needed
RCS
rcs at rcsprogramming.com
Tue Oct 29 18:33:01 EST 2002
More specifically, I would like to 'force-quit' (from a script) a request
to open a socket. I can get the effect I want by doing a 'Control-Period',
but that does not work from a script. It seems like you do have the control
from your engine to abandon this OS request...I would just like to be able
to control it from my program too.
Would there really be any harm in requesting an open socket from the OS,
but if I do not get a response within 5 seconds, just abort? Even if the OS
responds (one or two minutes later!), I have already moved on to something
else (i.e. trying another socket). It's like trying to go to URL from your
browser, but pressing the STOP button (because it is taking forever), and
moving on to another URL. Eventually the targeted URL may respond, but you
are already 'gone'. I can't imagine what it would be like if my browser
forced me to complete each call to a URL...I would be drinking way too much
coffee, that is for sure! ;-)
I just can't see a customer sitting in front of the computer for that long
before they realize that the device they want to communicate with is not
responding (power off, wrong IP, not connected, etc.). Since I cannot even
'ping' the device without opening a socket first, I too am subject to this
'waiting' from the program...so I see no way around this.
Thanks,
JR
> Date: Mon, 28 Oct 2002 11:21:16 -0700 (MST)
> From: Scott Raney <raney at metacard.com>
> To: metacard at lists.runrev.com
> Subject: Re: Invalid socket connect timeout?
> Reply-To: metacard at lists.runrev.com
>
> On Sun, 27 Oct 2002 "RCS" <rcs at rcsprogramming.com> wrote:
>
> > Is there a way to set the time that the internal MetaCard engine takes
to
> > 'try' to open a socket? I have found that if a socket is not valid (or
the
> > host is not on the network) MetaCard will try to connect for up to one
> > minute until it returns a socketError...is this normal?
>
> It'd be helpful to have the platform and the script you used for
> reports like this.
>
> The only problem I know of in this area is that "open socket .. with
> message" doesn't work right if a connection fails on MacOS. This has
> already been fixed for 2.5 alpha 7. In general, though, this sort of
> thing unfortunately is never going to work as well on MacOS (including
> OS X) as it does on Win32 and UNIX because of limitations in the way
> OpenTransport and the underlying socket implementation works (indeed,
> even the standard UNIX utilities like ping and telnet take a long time
> to time out compared with the equivalents on Win32 and other UNIX
> platforms). In some specific cases, specifically failed DNS lookups,
> that 60 second timeout is actually hard-coded into the OS and so is
> not anything we can change without writing a whole bunch of new code
> so that we don't have to rely on OS routines to do these lookups.
> Regards,
> Scott
>
> > Thanks,
> > JR
>
> ********************************************************
> Scott Raney raney at metacard.com http://www.metacard.com
> MetaCard: You know, there's an easier way to do that...
>
More information about the metacard
mailing list