mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-07 10:38:53 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user