Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
204b3884
Commit
204b3884
authored
Aug 16, 2021
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Extend Downstream stream_id to 64 bits
parent
544882ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
17 deletions
+17
-17
src/shrpx_downstream.cc
src/shrpx_downstream.cc
+7
-7
src/shrpx_downstream.h
src/shrpx_downstream.h
+10
-10
No files found.
src/shrpx_downstream.cc
View file @
204b3884
...
...
@@ -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
,
int
32
_t
stream_id
)
int
64
_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
(
int
32
_t
stream_id
)
{
stream_id_
=
stream_id
;
}
void
Downstream
::
set_stream_id
(
int
64
_t
stream_id
)
{
stream_id_
=
stream_id
;
}
int
32
_t
Downstream
::
get_stream_id
()
const
{
return
stream_id_
;
}
int
64
_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
(
int
32
_t
stream_id
)
{
void
Downstream
::
set_downstream_stream_id
(
int
64
_t
stream_id
)
{
downstream_stream_id_
=
stream_id
;
}
int
32
_t
Downstream
::
get_downstream_stream_id
()
const
{
int
64
_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
(
int
32
_t
stream_id
)
{
void
Downstream
::
set_assoc_stream_id
(
int
64
_t
stream_id
)
{
assoc_stream_id_
=
stream_id
;
}
int
32
_t
Downstream
::
get_assoc_stream_id
()
const
{
return
assoc_stream_id_
;
}
int
64
_t
Downstream
::
get_assoc_stream_id
()
const
{
return
assoc_stream_id_
;
}
BlockAllocator
&
Downstream
::
get_block_allocator
()
{
return
balloc_
;
}
...
...
src/shrpx_downstream.h
View file @
204b3884
...
...
@@ -319,20 +319,20 @@ enum class DispatchState {
class
Downstream
{
public:
Downstream
(
Upstream
*
upstream
,
MemchunkPool
*
mcpool
,
int
32
_t
stream_id
);
Downstream
(
Upstream
*
upstream
,
MemchunkPool
*
mcpool
,
int
64
_t
stream_id
);
~
Downstream
();
void
reset_upstream
(
Upstream
*
upstream
);
Upstream
*
get_upstream
()
const
;
void
set_stream_id
(
int
32
_t
stream_id
);
int
32
_t
get_stream_id
()
const
;
void
set_assoc_stream_id
(
int
32
_t
stream_id
);
int
32
_t
get_assoc_stream_id
()
const
;
void
set_stream_id
(
int
64
_t
stream_id
);
int
64
_t
get_stream_id
()
const
;
void
set_assoc_stream_id
(
int
64
_t
stream_id
);
int
64
_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
(
int
32
_t
stream_id
);
int
32
_t
get_downstream_stream_id
()
const
;
void
set_downstream_stream_id
(
int
64
_t
stream_id
);
int
64
_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
int
32
_t
stream_id_
;
int
64
_t
stream_id_
;
// The associated stream ID in frontend connection if this is pushed
// stream.
int
32
_t
assoc_stream_id_
;
int
64
_t
assoc_stream_id_
;
// stream ID in backend connection
int
32
_t
downstream_stream_id_
;
int
64
_t
downstream_stream_id_
;
// RST_STREAM error_code from downstream HTTP2 connection
uint32_t
response_rst_stream_error_code_
;
// An affinity cookie value.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment