Re: Checking for Network Connection



I'm sure there is a timeout option for the socket call, or you could
just do something like this:

require 'timeout'
timeout(10) do
# connect
end

On 8/30/06, Matt Todd <chiology@xxxxxxxxx> wrote:
Thanks... that was also a solution I had thought about, but couldn't
really manifest with my limited experience.

I'm not exactly sure how to do a timeout loop... or, rather, what you
mean. Do you want me to try three times? Or perhaps to say "timeout
after this amount of time"? Is that part of TCPSocket#new ?

:D

M.T.



.



Relevant Pages

  • Re: Socket recv() question?
    ... There's a limited amount of RAM in CE devices. ... Configure tx timeout ... increasing the timeout using the select method on the socket descriptor. ... sockets to send binary data from a pc to Pocket PC. ...
    (microsoft.public.windowsce.app.development)
  • Re: GetStream.Read behavior changed in .Net 2.0 with respect to ReceiveTimeout
    ... I only mentioned alternatives to implementing a timeout. ... Most socket i/o code does not bother with a timeout at all. ... Via a BeginXXX method you tell .NET to call a specific method when the i/o completes, and when it completes, your method is called. ...
    (microsoft.public.dotnet.framework)
  • Re: Socket recv() question?
    ... You might be doing something crazy, writing the data to the file one byte ... socket function correctly? ... The PC would send the data and Pocket PC would receive it. ... Configure tx timeout ...
    (microsoft.public.windowsce.app.development)
  • Re: Threads and socket.setdefaulttimeout
    ... settimeout on the socket) was because it seemed like the only way (and ... > their timeout period to allow other runnable threads to proceed. ... making the since-bad choice of using setdefaulttimeout to get timeouts ... code needs to check the lock to avoid conflict. ...
    (comp.lang.python)
  • Re: Socket recv() question?
    ... You might be doing something crazy, writing the data to the file one byte at ... socket function correctly? ... How come when I use the IE on the Pocket PC and started IIS on my PC. ... Configure tx timeout ...
    (microsoft.public.windowsce.app.development)