cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: No callbacks during POST

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 11 Jul 2007 23:01:54 +0200 (CEST)

On Mon, 9 Jul 2007, Raf Nulens wrote:

(Please don't top-post, it makes it very hard to follow this thread.)

> Our purpose is to rely on socket- and timeout-callbacks in order to call
> curl_multi_socket or curl_multi_socket_all.

Right, that's how the socket API is meant to work.

> We don't want to have a while(true) loop calling curl_multi_socket_all until
> all requests have finished.

No, that would of course be rather pointless.

> In this particular case we don't get a callback after a part of the buffer
> has been sent, so in our implementation curl_multi_socket or
> curl_multi_socket_all is never called and therefore the upload stops.

That sounds like a bug.

> Is it possible to use libcurl only by relying on socket- and
> timeout-callbacks?

Yes, when you use the multi_socket API that is how things are meant to work,
and I've written apps myself that work like that.

> Or should there be a socket-callback triggered at the end of function
> CURLcode Curl_readwrite(struct connectdata *conn, bool *done)?

No there shouldn't, as that would be the totally wrong place to do anything
like that.

Can you provide us with source code for an example program that repeats this
problem?

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-07-11