curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

OPENSOCKETFUNCTION documentation weirdness

From: Jeff Mears via curl-library <>
Date: Tue, 3 Dec 2019 03:16:00 +0000

The documentation for CURLOPT_OPENSOCKETFUNCTION is a little weird.

CURLSOCKTYPE_ACCEPT doesn't make any sense for OPENSOCKETFUNCTION, because there's no listener socket passed in. Indeed, the only code using this constant is ftp.c, which only uses the constant for the SOCKOPTFUNCTION:

  if(data->set.fsockopt) {
    int error = 0;

    /* activate callback for setting socket options */
    Curl_set_in_callback(data, true);
    error = data->set.fsockopt(data->set.sockopt_client,
    Curl_set_in_callback(data, false);

Received on 2019-12-03