cURL / Mailing Lists / curl-library / Single Mail

curl-library

curl_multi_socket_action: second argument?

From: Felix E. Klee <felix.klee_at_inka.de>
Date: Wed, 20 Jun 2012 18:56:24 +0200

What is the difference between calling `curl_multi_socket_action` with a
socket as second argument and with `CURL_SOCKET_TIMEOUT`?

My assumption:

* With socket as second argument:

  a) Calls `CURLOPT_WRITEFUNCTION` with data retrieved via that socket
    since the last call.

  b) Checks status of the socket. If status has changed, then calls:

      CURLMOPT_SOCKETFUNCTION

    I assume that when/after retrieving data, then the only status
    change that can happen here can be:

      CURL_POLL_REMOVE

    After all, the socket does already exist.

* With `CURL_SOCKET_TIMEOUT`:

  Checks statuses of *all sockets*, and for each socket whose status has
  changed, calls:

    CURLMOPT_SOCKETFUNCTION

Is that correct?
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-06-20