mirror of
https://github.com/curl/curl.git
synced 2026-08-24 16:33:33 +03:00
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.
This commit is contained in:
parent
d4e000906a
commit
b5d170b551
10 changed files with 71 additions and 25 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue