diff --git a/lib/includes/nghttp2/nghttp2.h b/lib/includes/nghttp2/nghttp2.h index 7515555c..d4ba7e3d 100644 --- a/lib/includes/nghttp2/nghttp2.h +++ b/lib/includes/nghttp2/nghttp2.h @@ -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 * diff --git a/lib/nghttp2_session.c b/lib/nghttp2_session.c index da678409..64e39da5 100644 --- a/lib/nghttp2_session.c +++ b/lib/nghttp2_session.c @@ -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; +}