cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Re: SessionHandle is waiting for resolve, but CURL_POLL_REMOVE is called to sockect callback and leads to Connection Closing

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 5 Jun 2016 13:04:29 +0200 (CEST)

On Sat, 4 Jun 2016, supercaowei wrote:

> But I cannot find, in what way does libcurl tell me that a transfer is
> completed and the session handle should be removed.

It is documented. Let me quote from the curl_multi_socket_action man page[1]:

   At return, the integer running_handles points to will contain the number of
   running easy handles within the multi handle. When this number reaches zero,
   all transfers are complete/done. When you call curl_multi_socket_action on a
   specific socket and the counter decreases by one, it DOES NOT necessarily
   mean that this exact socket/transfer is the one that completed. Use
   curl_multi_info_read to figure out which easy handle that completed.

Is there something there that is unclear?

[1] = https://curl.haxx.se/libcurl/c/curl_multi_socket_action.html

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