curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: which function pass libcurl internal socket (the argument sockfd) to curl_multi_socket_action in libcurl?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 2 May 2017 13:35:30 +0200 (CEST)

On Tue, 2 May 2017, Pahome Chen via curl-library wrote:

> curl_multi_socket_action(CURLM * multi_handle,
> curl_socket_t sockfd,
> int ev_bitmask,
> int *running_handles);
>
> where's the 2nd arguments called sockfd from?

'sockfd' is the socket on which your application has noticed activity.

libcurl tells your application which sockets it wants monitored with the
socket callback and you then tell libcurl with curl_multi_socket_action() when
such action happens.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2017-05-02