cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: non-blocking read function

From: Georg Lippitsch <georg.lippitsch_at_gmx.at>
Date: Tue, 30 Oct 2007 17:07:44 +0100

Am Dienstag, 30. Oktober 2007 14:00 schrieb Dmitriy Sergeyev:

>
> Maybe it is good idea, to add non-blocking ability for read function?

I agree, this would really be a great feature!
Had the same problem, and my solution was not to call curl_multi_perform until
there is new data available. But this is also very unpractical in case of
handling several connections in multi-mode.

My suggestion is: It should be possible to return 0 from readfunction, but
keeping connection alive (NOT cause it to stop the current transfer).
Instead, there should be a spezial return code that signals end-of-file.

Of course, this might bring up some problems with backward compatibility. So,
how about adding a new option that tells curl whether to break on 0-return or
not?
Received on 2007-10-30