@@ -57,6 +57,7 @@ pub(crate) struct Config {
5757 pub ( crate ) adaptive_window : bool ,
5858 pub ( crate ) initial_conn_window_size : u32 ,
5959 pub ( crate ) initial_stream_window_size : u32 ,
60+ pub ( crate ) initial_max_send_streams : Option < usize > ,
6061 pub ( crate ) max_frame_size : u32 ,
6162 pub ( crate ) keep_alive_interval : Option < Duration > ,
6263 pub ( crate ) keep_alive_timeout : Duration ,
@@ -71,6 +72,7 @@ impl Default for Config {
7172 adaptive_window : false ,
7273 initial_conn_window_size : DEFAULT_CONN_WINDOW ,
7374 initial_stream_window_size : DEFAULT_STREAM_WINDOW ,
75+ initial_max_send_streams : None ,
7476 max_frame_size : DEFAULT_MAX_FRAME_SIZE ,
7577 keep_alive_interval : None ,
7678 keep_alive_timeout : Duration :: from_secs ( 20 ) ,
@@ -89,6 +91,9 @@ fn new_builder(config: &Config) -> Builder {
8991 . max_frame_size ( config. max_frame_size )
9092 . max_send_buffer_size ( config. max_send_buffer_size )
9193 . enable_push ( false ) ;
94+ if let Some ( initial_max_send_streams) = config. initial_max_send_streams {
95+ builder. initial_max_send_streams ( initial_max_send_streams) ;
96+ }
9297 if let Some ( max) = config. max_concurrent_reset_streams {
9398 builder. max_concurrent_reset_streams ( max) ;
9499 }
0 commit comments