mirror of
https://github.com/curl/curl.git
synced 2026-08-25 09:03:32 +03:00
SOCKOPTFUNCTION: callback can say already-connected
Introducing a few CURL_SOCKOPT* defines for conveniance. The new CURL_SOCKOPT_ALREADY_CONNECTED signals to libcurl that the socket is to be treated as already connected and thus it will skip the connect() call.
This commit is contained in:
parent
a40f58d2ef
commit
1c3c0162c6
3 changed files with 16 additions and 5 deletions
|
|
@ -315,6 +315,13 @@ typedef enum {
|
|||
CURLSOCKTYPE_LAST /* never use */
|
||||
} curlsocktype;
|
||||
|
||||
/* The return code from the sockopt_callback can signal information back
|
||||
to libcurl: */
|
||||
#define CURL_SOCKOPT_OK 0
|
||||
#define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return
|
||||
CURLE_ABORTED_BY_CALLBACK */
|
||||
#define CURL_SOCKOPT_ALREADY_CONNECTED 2
|
||||
|
||||
typedef int (*curl_sockopt_callback)(void *clientp,
|
||||
curl_socket_t curlfd,
|
||||
curlsocktype purpose);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue