cURL / Mailing Lists / curl-library / Single Mail

curl-library

socket callback for setsockopt()

From: David McCreedy <mccreedytpf_at_msn.com>
Date: Thu, 10 Aug 2006 21:01:00 +0000

This patch revives an old, abandoned patch to add the
CURLOPT_SOCKOPTFUNCTION callback.
The callback is invoked by libcurl after the socket() call but before the
connect() call.
It passes the newly created socket descriptor so additional setsockopt()
calls can be done at the user's discretion.

The definition of curl_socket_t has been moved from include/curl/multi.h and
lib/setup.h to include/curl/curl.h so it is available for the typedef of the
curl_sockopt_callback.

The code changes for the callback itself are simple in comparison to moving
the curl_socket_t definition.

Here is the full list of changed files in the patch:

     docs/libcurl/curl_easy_setopt.3
     include/curl/curl.h
     include/curl/multi.h
     lib/connect.c
     lib/easy.c
     lib/setup.h
     lib/url.c
     lib/urldata.h

Please let me know if you have questions or concerns.

Thank you,

David McCreedy

Received on 2006-08-10