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
ee158fb0
Commit
ee158fb0
authored
Dec 13, 2014
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add nghttp2_session_{set,get}_next_stream_id API function
parent
280c9dfc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
+41
-0
lib/includes/nghttp2/nghttp2.h
lib/includes/nghttp2/nghttp2.h
+26
-0
lib/nghttp2_session.c
lib/nghttp2_session.c
+15
-0
No files found.
lib/includes/nghttp2/nghttp2.h
View file @
ee158fb0
...
...
@@ -2435,6 +2435,32 @@ int nghttp2_session_terminate_session2(nghttp2_session *session,
uint32_t
nghttp2_session_get_remote_settings
(
nghttp2_session
*
session
,
nghttp2_settings_id
id
);
/**
* @function
*
* Tells the |session| that next stream ID is |next_stream_id|. The
* |next_stream_id| must be equal or greater than the value returned
* by `nghttp2_session_get_next_stream_id()`.
*
* This function returns 0 if it succeeds, or one of the following
* negative error codes:
*
* :enum:`NGHTTP2_ERR_INVALID_ARGUMENT`
* The |next_stream_id| is strictly less than the value
* `nghttp2_session_get_next_stream_id()` returns.
*/
int
nghttp2_session_set_next_stream_id
(
nghttp2_session
*
session
,
int32_t
next_stream_id
);
/**
* @function
*
* Returns the next outgoing stream ID. Notice that return type is
* uint32_t. If we run out of stream ID for this session, this
* function returns 1 << 31.
*/
uint32_t
nghttp2_session_get_next_stream_id
(
nghttp2_session
*
session
);
/**
* @function
*
...
...
lib/nghttp2_session.c
View file @
ee158fb0
...
...
@@ -6158,3 +6158,18 @@ int nghttp2_session_consume(nghttp2_session *session, int32_t stream_id,
return
0
;
}
int
nghttp2_session_set_next_stream_id
(
nghttp2_session
*
session
,
int32_t
next_stream_id
)
{
if
(
next_stream_id
<
0
||
session
->
next_stream_id
>
(
uint32_t
)
next_stream_id
)
{
return
NGHTTP2_ERR_INVALID_ARGUMENT
;
}
session
->
next_stream_id
=
next_stream_id
;
return
0
;
}
uint32_t
nghttp2_session_get_next_stream_id
(
nghttp2_session
*
session
)
{
return
session
->
next_stream_id
;
}
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