diff options
author | Daniel Stenberg <daniel@haxx.se> | 2015-06-01 10:22:41 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-06-24 23:44:42 +0200 |
commit | 70191958b5db1814e13ef90856a9f70a5186e733 (patch) | |
tree | f71bcd7052f44ed6028055ae788a2e04ff8f3579 /include | |
parent | 5156982377d097490852a0fd47e74df0390f6a60 (diff) |
http2: initial HTTP/2 server push types/docs
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; |