Added functions to process received SETTINGS frame.

Now remote and local settings are stored separately.
The initial window size is included in SETTINGS frame, all active stream's
window sizes are now updated.
Removed the initial_window_size member from spdylay_stream because
it is the same as remote_settings's initial window size.
This commit is contained in:
Tatsuhiro Tsujikawa
2012-03-10 00:10:11 +09:00
parent 6c9e79e8ca
commit 82e20192d8
10 changed files with 193 additions and 37 deletions

View File

@@ -43,7 +43,7 @@ void spdylay_stream_init(spdylay_stream *stream, int32_t stream_id,
stream->stream_user_data = stream_user_data;
stream->deferred_data = NULL;
stream->deferred_flags = SPDYLAY_DEFERRED_NONE;
stream->initial_window_size = stream->window_size = initial_window_size;
stream->window_size = initial_window_size;
stream->recv_window_size = 0;
}
@@ -90,3 +90,11 @@ void spdylay_stream_detach_deferred_data(spdylay_stream *stream)
stream->deferred_data = NULL;
stream->deferred_flags = SPDYLAY_DEFERRED_NONE;
}
void spdylay_stream_update_initial_window_size(spdylay_stream *stream,
int32_t new_initial_window_size,
int32_t old_initial_window_size)
{
stream->window_size =
new_initial_window_size-(old_initial_window_size-stream->window_size);
}