#[non_exhaustive]pub struct TcpConfig {
pub last_ack_max_retries: usize,
pub last_ack_timeout: Duration,
pub close_wait_timeout: Duration,
pub timeout: Duration,
pub two_msl: Duration,
pub max_unacked_bytes: u32,
pub read_buffer_size: usize,
pub max_count_for_dup_ack: usize,
pub rto: Duration,
pub max_retransmit_count: usize,
pub options: Option<Vec<TcpOptions>>,
}Expand description
TCP configuration
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.last_ack_max_retries: usizeMaximum number of retries for sending the last ACK in the LAST_ACK state. Default is 3.
last_ack_timeout: DurationTimeout for the last ACK in the LAST_ACK state. Default is 500ms.
close_wait_timeout: DurationTimeout for the CLOSE_WAIT state. Default is 5 seconds.
timeout: DurationTimeout for TCP connections. Default is 60 seconds.
two_msl: DurationTimeout for the TIME_WAIT state. Default is 2 seconds.
max_unacked_bytes: u32Maximum number of unacknowledged bytes allowed in the send buffer.
read_buffer_size: usizeSize of the read buffer for incoming data.
max_count_for_dup_ack: usizeMaximum number of duplicate ACKs before triggering fast retransmission.
rto: DurationRetransmission timeout duration.
max_retransmit_count: usizeMaximum number of retransmissions before giving up.
options: Option<Vec<TcpOptions>>TCP options
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TcpConfig
impl RefUnwindSafe for TcpConfig
impl Send for TcpConfig
impl Sync for TcpConfig
impl Unpin for TcpConfig
impl UnwindSafe for TcpConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more