check for StreamId overflow (#68)

This commit is contained in:
Sean McArthur
2017-09-19 13:10:48 -07:00
committed by GitHub
parent e049dcb62b
commit 0c8bd75224
10 changed files with 141 additions and 43 deletions

View File

@@ -61,13 +61,14 @@ where
pub fn new(
codec: Codec<T, Prioritized<B::Buf>>,
settings: &frame::Settings,
next_stream_id: frame::StreamId
) -> Connection<T, P, B> {
// TODO: Actually configure
let streams = Streams::new(streams::Config {
local_init_window_sz: settings
.initial_window_size()
.unwrap_or(DEFAULT_INITIAL_WINDOW_SIZE),
local_max_initiated: None,
local_next_stream_id: next_stream_id,
local_push_enabled: settings.is_push_enabled(),
remote_init_window_sz: DEFAULT_INITIAL_WINDOW_SIZE,
remote_max_initiated: None,