nghttpx: Extend Downstream stream_id to 64 bits
This commit is contained in:
parent
3ed2da562b
commit
12425556c1
|
@ -113,7 +113,7 @@ void downstream_wtimeoutcb(struct ev_loop *loop, ev_timer *w, int revents) {
|
|||
|
||||
// upstream could be nullptr for unittests
|
||||
Downstream::Downstream(Upstream *upstream, MemchunkPool *mcpool,
|
||||
int32_t stream_id)
|
||||
int64_t stream_id)
|
||||
: dlnext(nullptr),
|
||||
dlprev(nullptr),
|
||||
response_sent_body_length(0),
|
||||
|
@ -605,9 +605,9 @@ void Downstream::reset_upstream(Upstream *upstream) {
|
|||
|
||||
Upstream *Downstream::get_upstream() const { return upstream_; }
|
||||
|
||||
void Downstream::set_stream_id(int32_t stream_id) { stream_id_ = stream_id; }
|
||||
void Downstream::set_stream_id(int64_t stream_id) { stream_id_ = stream_id; }
|
||||
|
||||
int32_t Downstream::get_stream_id() const { return stream_id_; }
|
||||
int64_t Downstream::get_stream_id() const { return stream_id_; }
|
||||
|
||||
void Downstream::set_request_state(DownstreamState state) {
|
||||
request_state_ = state;
|
||||
|
@ -904,11 +904,11 @@ StringRef Downstream::get_http2_settings() const {
|
|||
return http2_settings->value;
|
||||
}
|
||||
|
||||
void Downstream::set_downstream_stream_id(int32_t stream_id) {
|
||||
void Downstream::set_downstream_stream_id(int64_t stream_id) {
|
||||
downstream_stream_id_ = stream_id;
|
||||
}
|
||||
|
||||
int32_t Downstream::get_downstream_stream_id() const {
|
||||
int64_t Downstream::get_downstream_stream_id() const {
|
||||
return downstream_stream_id_;
|
||||
}
|
||||
|
||||
|
@ -1115,11 +1115,11 @@ DefaultMemchunks Downstream::pop_response_buf() {
|
|||
return std::move(response_buf_);
|
||||
}
|
||||
|
||||
void Downstream::set_assoc_stream_id(int32_t stream_id) {
|
||||
void Downstream::set_assoc_stream_id(int64_t stream_id) {
|
||||
assoc_stream_id_ = stream_id;
|
||||
}
|
||||
|
||||
int32_t Downstream::get_assoc_stream_id() const { return assoc_stream_id_; }
|
||||
int64_t Downstream::get_assoc_stream_id() const { return assoc_stream_id_; }
|
||||
|
||||
BlockAllocator &Downstream::get_block_allocator() { return balloc_; }
|
||||
|
||||
|
|
|
@ -319,20 +319,20 @@ enum class DispatchState {
|
|||
|
||||
class Downstream {
|
||||
public:
|
||||
Downstream(Upstream *upstream, MemchunkPool *mcpool, int32_t stream_id);
|
||||
Downstream(Upstream *upstream, MemchunkPool *mcpool, int64_t stream_id);
|
||||
~Downstream();
|
||||
void reset_upstream(Upstream *upstream);
|
||||
Upstream *get_upstream() const;
|
||||
void set_stream_id(int32_t stream_id);
|
||||
int32_t get_stream_id() const;
|
||||
void set_assoc_stream_id(int32_t stream_id);
|
||||
int32_t get_assoc_stream_id() const;
|
||||
void set_stream_id(int64_t stream_id);
|
||||
int64_t get_stream_id() const;
|
||||
void set_assoc_stream_id(int64_t stream_id);
|
||||
int64_t get_assoc_stream_id() const;
|
||||
void pause_read(IOCtrlReason reason);
|
||||
int resume_read(IOCtrlReason reason, size_t consumed);
|
||||
void force_resume_read();
|
||||
// Set stream ID for downstream HTTP2 connection.
|
||||
void set_downstream_stream_id(int32_t stream_id);
|
||||
int32_t get_downstream_stream_id() const;
|
||||
void set_downstream_stream_id(int64_t stream_id);
|
||||
int64_t get_downstream_stream_id() const;
|
||||
|
||||
int attach_downstream_connection(std::unique_ptr<DownstreamConnection> dconn);
|
||||
void detach_downstream_connection();
|
||||
|
@ -566,12 +566,12 @@ private:
|
|||
// How many times we tried in backend connection
|
||||
size_t num_retry_;
|
||||
// The stream ID in frontend connection
|
||||
int32_t stream_id_;
|
||||
int64_t stream_id_;
|
||||
// The associated stream ID in frontend connection if this is pushed
|
||||
// stream.
|
||||
int32_t assoc_stream_id_;
|
||||
int64_t assoc_stream_id_;
|
||||
// stream ID in backend connection
|
||||
int32_t downstream_stream_id_;
|
||||
int64_t downstream_stream_id_;
|
||||
// RST_STREAM error_code from downstream HTTP2 connection
|
||||
uint32_t response_rst_stream_error_code_;
|
||||
// An affinity cookie value.
|
||||
|
|
Loading…
Reference in New Issue