pub struct ServerFlowConfiguration<T: IdentityType + Clone, AE: AsyncExecutor> { /* private fields */ }Expand description
Configuration for a single server flow manager.
Implementations§
Source§impl<T: IdentityType + Clone + 'static, AE: AsyncExecutor + 'static> ServerFlowConfiguration<T, AE>
impl<T: IdentityType + Clone + 'static, AE: AsyncExecutor + 'static> ServerFlowConfiguration<T, AE>
Sourcepub fn new(config: FlowConfig, socket: Socket) -> Self
pub fn new(config: FlowConfig, socket: Socket) -> Self
Create a configuration with a pre-built socket.
Sourcepub fn with_address(config: FlowConfig, address: SocketAddr) -> Self
pub fn with_address(config: FlowConfig, address: SocketAddr) -> Self
Create a configuration that will bind a socket to the given address.
Sourcepub fn with_reader_count(self, count: usize) -> Self
pub fn with_reader_count(self, count: usize) -> Self
Set the number of SO_REUSEPORT reader sockets (Linux only).
The kernel distributes incoming datagrams across all sockets by 4-tuple hash,
enabling N concurrent recv_from drain tasks with no per-packet locking.
Has no effect (silently clamped to 1) on non-Linux platforms.
Sourcepub fn with_decoy_factory(self, factory: DecoyFactory<T, AE>) -> Self
pub fn with_decoy_factory(self, factory: DecoyFactory<T, AE>) -> Self
Override the decoy provider factory for this flow. When not set, the listener’s default factory (random selection) is used.
Sourcepub fn with_decoy<DP: DecoyCommunicationMode<T, AE> + 'static>(self) -> Self
pub fn with_decoy<DP: DecoyCommunicationMode<T, AE> + 'static>(self) -> Self
Override the decoy provider for this flow using a concrete type.
Sourcepub fn with_probe_factory(self, factory: ProbeFactory<AE>) -> Self
pub fn with_probe_factory(self, factory: ProbeFactory<AE>) -> Self
Override the active probe handler factory for this flow.
Sourcepub fn with_probe<PM: ActiveProbeHandler<AE> + Default + 'static>(self) -> Self
pub fn with_probe<PM: ActiveProbeHandler<AE> + Default + 'static>(self) -> Self
Override the active probe handler type for this flow.
Auto Trait Implementations§
impl<T, AE> !Freeze for ServerFlowConfiguration<T, AE>
impl<T, AE> !RefUnwindSafe for ServerFlowConfiguration<T, AE>
impl<T, AE> !UnwindSafe for ServerFlowConfiguration<T, AE>
impl<T, AE> Send for ServerFlowConfiguration<T, AE>
impl<T, AE> Sync for ServerFlowConfiguration<T, AE>
impl<T, AE> Unpin for ServerFlowConfiguration<T, AE>
impl<T, AE> UnsafeUnpin for ServerFlowConfiguration<T, AE>
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