pub struct Config {
pub session: u64,
pub retransmit_timeout: u64,
pub max_retries: u32,
}Expand description
Parameters of a Reliable connection.
Create one with Config::new and override fields as needed.
Fields§
§session: u64Identifier of the current session.
Both peers must use the same value, and it should be fresh for each session. Packets from a different session are ignored. This is not authentication.
retransmit_timeout: u64Time to wait for an acknowledgment before retransmitting, in
Timer ticks.
The wait begins once the packet has been written and the underlying transport flushed.
max_retries: u32Number of retransmissions attempted after the initial transmission.
When the timeout elapses with none left, the connection fails with
ConnectionError::Timeout. Zero fails at the first timeout.
Implementations§
Trait Implementations§
impl Copy for Config
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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