pub struct ServerConfig {
pub chunk_size: usize,
pub window: usize,
pub retransmit_after: Duration,
pub session_timeout: Duration,
pub max_sessions: usize,
}Expand description
Server tuning.
Fields§
§chunk_size: usizeBody bytes per continuation packet. The spec recommends ≥ 512 for large responses. Default 512.
window: usizeHow many unacknowledged packets may be in flight per session (the spec allows transmitting ahead of acks). Default 16.
retransmit_after: DurationRetransmit unacknowledged packets after this long. Default 500ms.
session_timeout: DurationDrop sessions that have not completed within this long. Default 30s.
max_sessions: usizeRefuse new sessions beyond this many concurrent peers (denial-of- service protection, per the spec’s sessions section). Default 1024.
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
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 ServerConfig
impl Debug for ServerConfig
Auto Trait Implementations§
impl Freeze for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnsafeUnpin for ServerConfig
impl UnwindSafe for ServerConfig
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