pub struct SocketOptions {
pub keep_alive: KeepAlive,
pub nagle_enabled: bool,
pub user_timeout: Option<NonZeroDuration>,
pub delayed_ack: bool,
pub fin_wait2_timeout: Option<Duration>,
pub max_syn_retries: NonZero<u8>,
pub ip_options: TcpIpSockOptions,
}
Expand description
TCP socket options.
This only stores options that are trivial to get and set.
Fields§
§keep_alive: KeepAlive
Socket options that control TCP keep-alive mechanism, see [KeepAlive
].
nagle_enabled: bool
Switch to turn nagle algorithm on/off.
user_timeout: Option<NonZeroDuration>
The period of time after which the connection should be aborted if no ACK is received.
delayed_ack: bool
Switch to turn delayed ACK on/off.
fin_wait2_timeout: Option<Duration>
The period of time after with a dangling FIN_WAIT2 state should be reclaimed.
max_syn_retries: NonZero<u8>
The maximum SYN retransmissions before aborting a connection.
ip_options: TcpIpSockOptions
Ip socket options.
Trait Implementations§
Source§impl Clone for SocketOptions
impl Clone for SocketOptions
Source§fn clone(&self) -> SocketOptions
fn clone(&self) -> SocketOptions
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SocketOptions
impl Debug for SocketOptions
Source§impl Default for SocketOptions
impl Default for SocketOptions
Source§fn default() -> SocketOptions
fn default() -> SocketOptions
Returns the “default value” for a type. Read more
Source§impl PartialEq for SocketOptions
impl PartialEq for SocketOptions
impl Copy for SocketOptions
impl Eq for SocketOptions
impl StructuralPartialEq for SocketOptions
Auto Trait Implementations§
impl Freeze for SocketOptions
impl RefUnwindSafe for SocketOptions
impl Send for SocketOptions
impl Sync for SocketOptions
impl Unpin for SocketOptions
impl UnwindSafe for SocketOptions
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
Source§impl<O, BC> BuildableCoreContext<BC> for Owhere
O: Default,
impl<O, BC> BuildableCoreContext<BC> for Owhere
O: Default,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
Source§impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
Source§fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
Send a frame. Read more
Source§impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
Source§fn handle_timer(
&mut self,
bindings_ctx: &mut BC,
dispatch: Id,
timer: <BC as TimerBindingsTypes>::UniqueTimerId,
)
fn handle_timer( &mut self, bindings_ctx: &mut BC, dispatch: Id, timer: <BC as TimerBindingsTypes>::UniqueTimerId, )
Handle a timer firing. Read more
Source§impl<L, T> UnlockedAccess<L> for Twhere
L: UnlockedAccessMarkerFor<T>,
impl<L, T> UnlockedAccess<L> for Twhere
L: UnlockedAccessMarkerFor<T>,
Source§type Data = <L as UnlockedAccessMarkerFor<T>>::Data
type Data = <L as UnlockedAccessMarkerFor<T>>::Data
The type of state being accessed.
Source§type Guard<'l> = &'l <L as UnlockedAccessMarkerFor<T>>::Data
where
T: 'l
type Guard<'l> = &'l <L as UnlockedAccessMarkerFor<T>>::Data where T: 'l
A guard providing read access to the data.
Source§fn access(&self) -> <T as UnlockedAccess<L>>::Guard<'_>
fn access(&self) -> <T as UnlockedAccess<L>>::Guard<'_>
How to access the state.