cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Recommended architecture for streaming over multiple sockets

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 8 Mar 2016 15:39:44 +0100 (CET)

On Tue, 8 Mar 2016, Boutin Mal wrote:

Please don't top-post, it makes the conversation confusing.

> Currently i call multi_perform when there are data to be sent. How can i
> obtain the send status ? By performing a select on the handles ?

Yes, you would call select on the file descriptors with the actions libcurl
told you, and if one of those signal readiness you call curl_multi_perform().

> As i'm doing chunked encoding transfer, i don't have to check for a
> response on the handle

You can't avoid checking for a response since you're talking HTTP with libcurl
and it will of course allow a HTTP response.

> but i'd like to know when packets could not be sent,

What do you mean "could not be sent" ? It's TCP so everything is sent or not
sent and if something fails miserably, the transfer will break and libcurl
returns an error.

-- 
  / daniel.haxx.se

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-03-08