From f3a76d84f1fa5005145f695ff8e035fee99260d4 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 6 Oct 2014 23:47:43 +0900 Subject: [PATCH] Document that only one data is allowed for one stream at a time --- lib/includes/nghttp2/nghttp2.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/includes/nghttp2/nghttp2.h b/lib/includes/nghttp2/nghttp2.h index ce8362c9..68e9c3e4 100644 --- a/lib/includes/nghttp2/nghttp2.h +++ b/lib/includes/nghttp2/nghttp2.h @@ -2638,6 +2638,17 @@ int32_t nghttp2_submit_headers(nghttp2_session *session, uint8_t flags, * The |stream_id| is 0. * :enum:`NGHTTP2_ERR_STREAM_CLOSED` * The stream was alreay closed; or the |stream_id| is invalid. + * + * .. note:: + * + * Currently, only one data is allowed for a stream at a time. + * Submitting data more than once before first data is finished + * results in :enum:`NGHTTP2_ERR_DATA_EXIST` error code. The + * earliest callback which tells that previous data is done is + * :type:`nghttp2_on_frame_send_callback`. In side that callback, + * new data can be submitted using `nghttp2_submit_data()`. Of + * course, all data except for last one must not have + * :enum:`NGHTTP2_FLAG_END_STREAM` flag set in |flags|. */ int nghttp2_submit_data(nghttp2_session *session, uint8_t flags, int32_t stream_id,