Change nghttp2_session_get_stream_remote_window_size behavior

Now it returns only stream's available remote window size, without
considering connection level window size.  For connection-level window
size, nghttp2_session_get_remote_window_size() is added by this
commit.  To get old behavior of
nghttp2_session_get_stream_remote_window_size() is use
min(nghttp2_session_get_stream_remote_window_size(),
nghttp2_session_get_remote_window_size()).  The reason of this change
is that it is desirable to know just stream level window size without
taking into connection level window size.  This is useful for
debugging purpose.
This commit is contained in:
Tatsuhiro Tsujikawa
2014-08-23 18:41:34 +09:00
parent 03ed29953e
commit 82bc7198e6
4 changed files with 35 additions and 6 deletions

View File

@@ -2201,6 +2201,13 @@ void test_nghttp2_session_on_settings_received(void)
CU_ASSERT(16*1024 == stream1->remote_window_size);
CU_ASSERT(-48*1024 == stream2->remote_window_size);
CU_ASSERT(16*1024 ==
nghttp2_session_get_stream_remote_window_size(session,
stream1->stream_id));
CU_ASSERT(0 ==
nghttp2_session_get_stream_remote_window_size(session,
stream2->stream_id));
nghttp2_frame_settings_free(&frame.settings);
nghttp2_session_del(session);