feat(http2): Add window size config options for Client and Server
Add `fn http2_initial_stream_window_size` and `fn http2_initial_connection_window_size` for client and server. Closes #1771
This commit is contained in:
		
				
					committed by
					
						 Sean McArthur
						Sean McArthur
					
				
			
			
				
	
			
			
			
						parent
						
							2114950cda
						
					
				
				
					commit
					7dcd4618c0
				
			| @@ -971,6 +971,25 @@ impl Builder { | ||||
|         self | ||||
|     } | ||||
|  | ||||
|     /// Sets the [`SETTINGS_INITIAL_WINDOW_SIZE`][spec] option for HTTP2 | ||||
|     /// stream-level flow control. | ||||
|     /// | ||||
|     /// Default is 65,535 | ||||
|     /// | ||||
|     /// [spec]: https://http2.github.io/http2-spec/#SETTINGS_INITIAL_WINDOW_SIZE | ||||
|     pub fn http2_initial_stream_window_size(&mut self, sz: impl Into<Option<u32>>) -> &mut Self { | ||||
|         self.conn_builder.http2_initial_stream_window_size(sz.into()); | ||||
|         self | ||||
|     } | ||||
|  | ||||
|     /// Sets the max connection-level flow control for HTTP2 | ||||
|     /// | ||||
|     /// Default is 65,535 | ||||
|     pub fn http2_initial_connection_window_size(&mut self, sz: impl Into<Option<u32>>) -> &mut Self { | ||||
|         self.conn_builder.http2_initial_connection_window_size(sz.into()); | ||||
|         self | ||||
|     } | ||||
|  | ||||
|     /// Sets the maximum idle connection per host allowed in the pool. | ||||
|     /// | ||||
|     /// Default is `usize::MAX` (no limit). | ||||
|   | ||||
		Reference in New Issue
	
	Block a user