Add nghttp2_session_check_server_session() API
This is very simple API, and it returns nonzero if session is initialized as server.
This commit is contained in:
parent
63aa3466e9
commit
63a50b1ccf
|
@ -3616,6 +3616,14 @@ nghttp2_session_get_last_proc_stream_id(nghttp2_session *session);
|
|||
NGHTTP2_EXTERN int
|
||||
nghttp2_session_check_request_allowed(nghttp2_session *session);
|
||||
|
||||
/**
|
||||
* @function
|
||||
*
|
||||
* Returns nonzero if |session| is initialized as server side session.
|
||||
*/
|
||||
NGHTTP2_EXTERN int
|
||||
nghttp2_session_check_server_session(nghttp2_session *session);
|
||||
|
||||
/**
|
||||
* @function
|
||||
*
|
||||
|
|
|
@ -6767,3 +6767,7 @@ nghttp2_stream *nghttp2_session_find_stream(nghttp2_session *session,
|
|||
nghttp2_stream *nghttp2_session_get_root_stream(nghttp2_session *session) {
|
||||
return &session->root;
|
||||
}
|
||||
|
||||
int nghttp2_session_check_server_session(nghttp2_session *session) {
|
||||
return session->server;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue