Move NGHTTP2_PRI_* to nghttp2.h, fix too small pri data type in src
This commit is contained in:
parent
8b3a3efadc
commit
94258cd0b8
|
@ -45,6 +45,13 @@ struct nghttp2_session;
|
||||||
*/
|
*/
|
||||||
typedef struct nghttp2_session nghttp2_session;
|
typedef struct nghttp2_session nghttp2_session;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @macro
|
||||||
|
* default priority value
|
||||||
|
*/
|
||||||
|
#define NGHTTP2_PRI_DEFAULT (1 << 30)
|
||||||
|
#define NGHTTP2_PRI_LOWEST ((1U << 31) - 1)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum
|
* @enum
|
||||||
*
|
*
|
||||||
|
|
|
@ -33,13 +33,6 @@
|
||||||
#include "nghttp2_hd.h"
|
#include "nghttp2_hd.h"
|
||||||
#include "nghttp2_buffer.h"
|
#include "nghttp2_buffer.h"
|
||||||
|
|
||||||
/**
|
|
||||||
* @macro
|
|
||||||
* default priority value
|
|
||||||
*/
|
|
||||||
#define NGHTTP2_PRI_DEFAULT (1 << 30)
|
|
||||||
#define NGHTTP2_PRI_LOWEST ((1U << 31) - 1)
|
|
||||||
|
|
||||||
#define NGHTTP2_MAX_FRAME_SIZE ((1 << 16) - 1)
|
#define NGHTTP2_MAX_FRAME_SIZE ((1 << 16) - 1)
|
||||||
|
|
||||||
#define NGHTTP2_STREAM_ID_MASK 0x7fffffff
|
#define NGHTTP2_STREAM_ID_MASK 0x7fffffff
|
||||||
|
|
|
@ -142,7 +142,7 @@ int Spdylay::submit_request(const std::string& scheme,
|
||||||
const std::string& hostport,
|
const std::string& hostport,
|
||||||
const std::string& path,
|
const std::string& path,
|
||||||
const std::map<std::string,std::string> &headers,
|
const std::map<std::string,std::string> &headers,
|
||||||
uint8_t pri,
|
int32_t pri,
|
||||||
const nghttp2_data_provider *data_prd,
|
const nghttp2_data_provider *data_prd,
|
||||||
int64_t data_length,
|
int64_t data_length,
|
||||||
void *stream_user_data)
|
void *stream_user_data)
|
||||||
|
|
|
@ -58,7 +58,7 @@ public:
|
||||||
int submit_request(const std::string& scheme,
|
int submit_request(const std::string& scheme,
|
||||||
const std::string& hostport, const std::string& path,
|
const std::string& hostport, const std::string& path,
|
||||||
const std::map<std::string,std::string>& headers,
|
const std::map<std::string,std::string>& headers,
|
||||||
uint8_t pri,
|
int32_t pri,
|
||||||
const nghttp2_data_provider *data_prd,
|
const nghttp2_data_provider *data_prd,
|
||||||
int64_t data_length,
|
int64_t data_length,
|
||||||
void *stream_user_data);
|
void *stream_user_data);
|
||||||
|
|
|
@ -373,7 +373,8 @@ void submit_request(Spdylay& sc, const std::string& hostport,
|
||||||
{
|
{
|
||||||
std::string path = req->make_reqpath();
|
std::string path = req->make_reqpath();
|
||||||
int r = sc.submit_request(get_uri_field(req->uri.c_str(), req->u, UF_SCHEMA),
|
int r = sc.submit_request(get_uri_field(req->uri.c_str(), req->u, UF_SCHEMA),
|
||||||
hostport, path, headers, 3, req->data_prd,
|
hostport, path, headers,
|
||||||
|
NGHTTP2_PRI_DEFAULT, req->data_prd,
|
||||||
req->data_length, req);
|
req->data_length, req);
|
||||||
assert(r == 0);
|
assert(r == 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue