Subject: Re: timeouts in libssh2 blocking-mode

Re: timeouts in libssh2 blocking-mode

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 2 May 2011 22:19:32 +0200 (CEST)

On Tue, 3 May 2011, Matt Lilley wrote:

> Ok, that sounds fine to me. Daniel has commented that he'd prefer the timeout
> to be the maximum time that any libssh2 function can remain blocked, which I
> agree would be nice, but I'm not sure how to implement

I suggest we:

A) mark the time when the function is first entered.

B) when select() is about to be called, we can check how long time that
    has elapsed since the entry time and just do the math on how long the
    select timeout may be (this time).

--
  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-05-02