pub struct Config { /* private fields */ }
Expand description
Yamux configuration.
The default configuration values are as follows:
- receive window = 256 KiB
- max. buffer size (per stream) = 1 MiB
- max. number of streams = 8192
- window update mode = on receive
Implementations§
source§impl Config
impl Config
sourcepub fn set_receive_window(&mut self, n: u32) -> Result<(), ()>
pub fn set_receive_window(&mut self, n: u32) -> Result<(), ()>
Set the receive window (must be >= 256 KiB).
sourcepub fn set_max_buffer_size(&mut self, n: usize)
pub fn set_max_buffer_size(&mut self, n: usize)
Set the max. buffer size per stream.
sourcepub fn set_max_num_streams(&mut self, n: usize)
pub fn set_max_num_streams(&mut self, n: usize)
Set the max. number of streams.
sourcepub fn set_window_update_mode(&mut self, m: WindowUpdateMode)
pub fn set_window_update_mode(&mut self, m: WindowUpdateMode)
Set the window update mode to use.