pub struct BindOptions {
pub v6_only: bool,
pub reuseaddr: bool,
pub backlog: i32,
}Expand description
Configuration knobs for bind_dual_stack.
Fields§
§v6_only: boolWhen the bind address is a v6 wildcard ([::]), set the
IPV6_V6ONLY flag instead of accepting v4-mapped clients.
The default (false) accepts both families, matching the
platform default on Linux.
reuseaddr: boolSO_REUSEADDR. Defaults to true.
backlog: i32TCP listen backlog. Defaults to 1024. The configured pool
backlog knob (Stage 4) feeds this field at startup.
Implementations§
Source§impl BindOptions
impl BindOptions
Sourcepub fn v6_only_strict() -> Self
pub fn v6_only_strict() -> Self
Build options with v6_only = true and the other knobs at
their defaults.
§Examples
use dynomite::net::listener::BindOptions;
assert!(BindOptions::v6_only_strict().v6_only);Trait Implementations§
Source§impl Clone for BindOptions
impl Clone for BindOptions
Source§fn clone(&self) -> BindOptions
fn clone(&self) -> BindOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BindOptions
impl Debug for BindOptions
Source§impl Default for BindOptions
impl Default for BindOptions
Source§fn default() -> BindOptions
fn default() -> BindOptions
Returns the “default value” for a type. Read more
impl Copy for BindOptions
Auto Trait Implementations§
impl Freeze for BindOptions
impl RefUnwindSafe for BindOptions
impl Send for BindOptions
impl Sync for BindOptions
impl Unpin for BindOptions
impl UnsafeUnpin for BindOptions
impl UnwindSafe for BindOptions
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