Commit 63a50b1c authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Add nghttp2_session_check_server_session() API

This is very simple API, and it returns nonzero if session is
initialized as server.
parent 63aa3466
......@@ -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;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment