cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re[4]: Working with curl connections as with sockets.

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 3 May 2008 13:54:01 +0200 (CEST)

On Sat, 3 May 2008, Tetetest wrote:

> The caller should *always* wait on the socket to become ready (and it must
> be mentioned in the docs, so I will update the man pages).

[...]

> Anyway, these functions are fairly low-level, and we know that low-level
> functions are usually harder to use.

But why enforce this rule when there's really no reason? I think people using
them will appreciate that these functions work like send() and recv() and
those functions (the plain send/recv I mean) can be called in (possibly)
blocking situations and the return code tells what happened. Returning the
standard recv or send error in that situation is not right in any case IMHO.

So, supporting an EAGAIN-style return code will make our functions more likely
to work as drop-in replacements in existing applications.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2008-05-03