From 00ead22395e70111b23c57f6a4e746ce5a44c36e Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 17 Aug 2014 21:26:56 +0900 Subject: [PATCH] Don't allow frame submission for pending new frame This is partial revert of bbe4f5a3d11f8f3e751a661ac93f2368501c7a9e. Only documentation is reverted. Since we have 2 queues to handle maximum concurrent streams, we are not ready to allow immediate frame submission for pending new frames. --- lib/includes/nghttp2/nghttp2.h | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/lib/includes/nghttp2/nghttp2.h b/lib/includes/nghttp2/nghttp2.h index 31492f86..0031789b 100644 --- a/lib/includes/nghttp2/nghttp2.h +++ b/lib/includes/nghttp2/nghttp2.h @@ -2239,13 +2239,11 @@ int nghttp2_priority_spec_check_default(const nghttp2_priority_spec *pri_spec); * * .. warning:: * - * This function returns assigned stream ID if it succeeds and - * |stream_id| is -1. But that stream is not opened yet. The - * application must not submit WINDOW_UPDATE frame using - * `nghttp2_submit_window_update()` to that stream ID before + * This function returns assigned stream ID if it succeeds. But + * that stream is not opened yet. The application must not submit + * frame to that stream ID before * :member:`nghttp2_session_callbacks.before_frame_send_callback` is - * called for this frame. Other types of frames can be submitted to - * the returned stream ID. + * called for this frame. * */ int32_t nghttp2_submit_request(nghttp2_session *session, @@ -2369,11 +2367,9 @@ int nghttp2_submit_response(nghttp2_session *session, * * This function returns assigned stream ID if it succeeds and * |stream_id| is -1. But that stream is not opened yet. The - * application must not submit WINDOW_UPDATE frame using - * `nghttp2_submit_window_update()` to that stream ID before + * application must not submit frame to that stream ID before * :member:`nghttp2_session_callbacks.before_frame_send_callback` is - * called for this frame. Other types of frames can be submitted to - * the returned stream ID. + * called for this frame. * */ int32_t nghttp2_submit_headers(nghttp2_session *session, uint8_t flags, @@ -2542,6 +2538,14 @@ int nghttp2_submit_settings(nghttp2_session *session, uint8_t flags, * :enum:`NGHTTP2_ERR_INVALID_ARGUMENT` * The |stream_id| is 0. * + * .. warning:: + * + * This function returns assigned promised stream ID if it succeeds. + * But that stream is not opened yet. The application must not + * submit frame to that stream ID before + * :member:`nghttp2_session_callbacks.before_frame_send_callback` is + * called for this frame. + * */ int32_t nghttp2_submit_push_promise(nghttp2_session *session, uint8_t flags, int32_t stream_id,