http2: initial HTTP/2 server push types/docs
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user