pub struct Config {
pub latency: Duration,
pub max_connections: usize,
pub handshakes_per_second: u32,
pub buffer_packets: usize,
pub peer_idle: Duration,
pub accept_timeout: Duration,
pub crypto: Option<CryptoConfig>,
pub require_encryption: bool,
pub allow_plaintext: bool,
}Expand description
Limits and policy for a Listener.
Fields§
§latency: DurationOur receive latency; a caller asking for more gets more.
max_connections: usizeConnections, open or waiting for the application, at most.
handshakes_per_second: u32Handshake packets answered per second, at most (bursts of twice).
buffer_packets: usizeReceive buffer per connection, in packets.
peer_idle: DurationA connection that sends nothing for this long is closed.
accept_timeout: DurationThe application has this long to accept or reject a caller.
crypto: Option<CryptoConfig>Lab/global secret. Production admission can use accept_with_crypto.
require_encryption: boolRequire KM before emitting Connect; select the session secret in accept_with_crypto when no global secret is configured.
allow_plaintext: boolWith a secret in crypto, also admit callers that send no key
material, as libsrt does with enforced encryption off. A caller that
does encrypt must still match the secret. Ignored when
require_encryption is set.