diff options
author | Daniel Stenberg <daniel@haxx.se> | 2011-05-16 23:46:43 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2011-05-18 22:56:46 +0200 |
commit | b5d170b55110bacc61a4aa8bf99df1afc303c5dc (patch) | |
tree | 916f3bf3ebe145d00fa4a785658d19131d432cb7 /include | |
parent | d4e000906ac4ef243258a5c9a819a7cde247d16a (diff) | |
download | curl-b5d170b55110bacc61a4aa8bf99df1afc303c5dc.tar.gz |
CLOSESOCKETFUNCTION: added
Introduced the initial setup to allow closesocket callbacks by making
sure sclose() is only ever called from one place in the libcurl source
and still run all test cases fine.
Diffstat (limited to 'include')
-rw-r--r-- | include/curl/curl.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/curl/curl.h b/include/curl/curl.h index 09f305466..e4fbfdf89 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -341,6 +341,9 @@ typedef curl_socket_t curlsocktype purpose, struct curl_sockaddr *address); +typedef void +(*curl_closesocket_callback)(void *clientp, curl_socket_t item); + typedef enum { CURLIOE_OK, /* I/O operation successful */ CURLIOE_UNKNOWNCMD, /* command was unknown to callback */ @@ -1475,6 +1478,11 @@ typedef enum { */ CINIT(TRANSFER_ENCODING, LONG, 207), + /* Callback function for closing socket (instead of close(2)). The callback + should have type curl_closesocket_callback */ + CINIT(CLOSESOCKETFUNCTION, FUNCTIONPOINT, 208), + CINIT(CLOSESOCKETDATA, OBJECTPOINT, 209), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; |