pub struct TcpServerConfig {
pub max_connections: Option<usize>,
pub nodelay: bool,
pub keep_alive: Option<Duration>,
pub timeout: Option<Duration>,
}Expand description
Configuration for TCP server behavior
Fields§
§max_connections: Option<usize>Maximum number of concurrent connections
nodelay: boolSocket TCP_NODELAY setting, applied to every accepted stream.
keep_alive: Option<Duration>TCP keep-alive duration.
Currently not applied: neither std::net::TcpStream nor
moirai_pal::net::AsyncTcpStream exposes a keep-alive setter (it
requires SO_KEEPALIVE/TCP_KEEPIDLE support in the PAL). Pending PAL
wiring; until then the value is configuration-only.
timeout: Option<Duration>Connection timeout.
Currently not applied: accepted sockets are non-blocking (reactor
driven), where SO_RCVTIMEO/SO_SNDTIMEO have no effect. Async
deadlines are expressed by wrapping operations in
crate::timer::timeout(); automatic application of this value is
pending.
Trait Implementations§
Source§impl Clone for TcpServerConfig
impl Clone for TcpServerConfig
Source§impl Debug for TcpServerConfig
impl Debug for TcpServerConfig
Auto Trait Implementations§
impl Freeze for TcpServerConfig
impl RefUnwindSafe for TcpServerConfig
impl Send for TcpServerConfig
impl Sync for TcpServerConfig
impl Unpin for TcpServerConfig
impl UnsafeUnpin for TcpServerConfig
impl UnwindSafe for TcpServerConfig
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