pub struct StreamConfig {
pub rx_buf_min_size: usize,
pub tx_buf_min_size: usize,
pub tx_buf_max_size: usize,
pub stream_write_timeout: Duration,
pub stream_connect_timeout: Duration,
}Expand description
Stream related configuration parameters.
Fields§
§rx_buf_min_size: usizeDefines the minimum size of the buffer used for message reassembly. Low values will cause more frequent reallocation while high values will reallocate less at the expense of more memory usage.
tx_buf_min_size: usizeDefines the minimum size of the buffer used for outbound data. Low values will cause more frequent reallocation while high values will reallocate less at the expense of more memory usage.
tx_buf_max_size: usizeDefines the maximum capacity of the send buffer. Once the send buffer is full, it is not possible to queue new messages for sending until some capacity is available. A send buffer becomes full when sending messages faster than the remote peer is reading.
stream_write_timeout: DurationThe duration after which a peer is disconnected if it fails to read incoming data.
stream_connect_timeout: DurationThe duration after which a connect attempt is abandoned. Applies only to non-blocking connect attempts. Blocking ones performed in custom connectors ignore this value.
Trait Implementations§
Source§impl Clone for StreamConfig
impl Clone for StreamConfig
Source§fn clone(&self) -> StreamConfig
fn clone(&self) -> StreamConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more