diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/curl/multi.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/curl/multi.h b/include/curl/multi.h index 0d859f8fd..ed3a3a793 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -283,6 +283,32 @@ typedef int (*curl_multi_timer_callback)(CURLM *multi, /* multi handle */ void *userp); /* private callback pointer */ +/* + * Name: curl_push_callback + * + * Desc: This callback gets called when a new stream is being pushed by the + * server. It approves or denies the new stream. + * + * Returns: CURL_PUSH_OK or CURL_PUSH_DENY. + */ +#define CURL_PUSH_OK 0 +#define CURL_PUSH_DENY 1 + +struct curl_headerpair { + unsigned char *name; /* zero terminated name */ + size_t namelen; /* length of 'name' */ + unsigned char *value; /* zero terminated name */ + size_t valuelen; /* length of 'value' */ +}; + +struct curl_pushheaders; /* forward declaration only */ + +typedef int (*curl_push_callback)(CURL *parent, + CURL *easy, + int num_headers, + struct curl_pushheaders *headers, + void *userp); + CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s, int *running_handles); @@ -370,6 +396,12 @@ typedef enum { /* maximum number of open connections in total */ CINIT(MAX_TOTAL_CONNECTIONS, LONG, 13), + /* This is the server push callback function pointer */ + CINIT(PUSHFUNCTION, FUNCTIONPOINT, 14), + + /* This is the argument passed to the server push callback */ + CINIT(PUSHDATA, OBJECTPOINT, 15), + CURLMOPT_LASTENTRY /* the last unused */ } CURLMoption; |