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
8fcf5f60
Commit
8fcf5f60
authored
Jul 08, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttp: Add --max-concurrent-streams option
parent
c00f8e38
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
src/nghttp.cc
src/nghttp.cc
+10
-2
src/nghttp.h
src/nghttp.h
+1
-0
No files found.
src/nghttp.cc
View file @
8fcf5f60
...
...
@@ -95,7 +95,7 @@ constexpr auto anchors = std::array<Anchor, 5>{{
}
// namespace
Config
::
Config
()
:
padding
(
0
),
:
padding
(
0
),
max_concurrent_streams
(
100
),
peer_max_concurrent_streams
(
NGHTTP2_INITIAL_MAX_CONCURRENT_STREAMS
),
header_table_size
(
-
1
),
weight
(
NGHTTP2_DEFAULT_WEIGHT
),
multiply
(
1
),
timeout
(
0.
),
window_bits
(
-
1
),
connection_window_bits
(
-
1
),
verbose
(
0
),
...
...
@@ -760,7 +760,7 @@ size_t populate_settings(nghttp2_settings_entry *iv) {
size_t
niv
=
2
;
iv
[
0
].
settings_id
=
NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS
;
iv
[
0
].
value
=
100
;
iv
[
0
].
value
=
config
.
max_concurrent_streams
;
iv
[
1
].
settings_id
=
NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE
;
if
(
config
.
window_bits
!=
-
1
)
{
...
...
@@ -2435,6 +2435,9 @@ Options:
hex+ASCII display). If SSL/TLS is used, decrypted data
are used.
--no-push Disable server push.
--max-concurrent-streams=<N>
The number of concurrent pushed streams this client
accepts.
--version Display version information and exit.
-h, --help Display this help and exit.
...
...
@@ -2488,6 +2491,7 @@ int main(int argc, char **argv) {
{
"trailer"
,
required_argument
,
&
flag
,
9
},
{
"hexdump"
,
no_argument
,
&
flag
,
10
},
{
"no-push"
,
no_argument
,
&
flag
,
11
},
{
"max-concurrent-streams"
,
required_argument
,
&
flag
,
12
},
{
nullptr
,
0
,
nullptr
,
0
}};
int
option_index
=
0
;
int
c
=
getopt_long
(
argc
,
argv
,
"M:Oab:c:d:gm:np:r:hH:vst:uw:W:"
,
...
...
@@ -2679,6 +2683,10 @@ int main(int argc, char **argv) {
// no-push option
config
.
no_push
=
true
;
break
;
case
12
:
// max-concurrent-streams option
config
.
max_concurrent_streams
=
strtoul
(
optarg
,
nullptr
,
10
);
break
;
}
break
;
default:
...
...
src/nghttp.h
View file @
8fcf5f60
...
...
@@ -70,6 +70,7 @@ struct Config {
std
::
string
harfile
;
nghttp2_option
*
http2_option
;
size_t
padding
;
size_t
max_concurrent_streams
;
ssize_t
peer_max_concurrent_streams
;
ssize_t
header_table_size
;
int32_t
weight
;
...
...
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