curl-library
Re: Automated telnet problems
From: Yang Tse <yangsita_at_gmail.com>
Date: Thu, 12 Mar 2009 01:53:32 +0100
Date: Thu, 12 Mar 2009 01:53:32 +0100
2009/3/11, Pierre Brico wrote:
> [...] my first issue (I tested it under Windows and
> it works). However, the behavior is different of what I was waiting for.
> Indeed, I though the timeout was computed between two calls of the
> write_callback function and not computed by subtracting current time from
> connected time.
CURLOPT_TIMEOUT is for the (whole) libcurl transfer operation, for
TELNET this is the complete TELNET session.
> Is it possible to have a timeout only if the time between two consecutive
> calls to write_callback function is more than X seconds (I won't have a
> timeout if there's still activity) ?
CURLOPT_LOW_SPEED_LIMIT and CURLOPT_LOW_SPEED_TIME should serve your needs.
-- -=[Yang]=-Received on 2009-03-12