pub struct ChannelCapacities {
pub rx: NonZeroUsize,
pub unrouted: NonZeroUsize,
pub send: NonZeroUsize,
pub deliver: NonZeroUsize,
pub accept: NonZeroUsize,
}tokio only.Expand description
The capacity of every bounded channel the adapter owns, all the caller’s: a channel of zero slots is unrepresentable.
Fields§
§rx: NonZeroUsizeA per-connection inbound-datagram channel (the dedicated forwarder for a
SrtSocket::connected caller, or a SrtListener’s per-accepted-connection route):
bounded so a peer that floods faster than the driver task’s tick loop can drain does not
grow the queue without bound; excess datagrams are dropped, not buffered.
unrouted: NonZeroUsizeA SrtListener’s candidate-new-connection queue (datagrams the routing pump could not
match to any accepted connection): bounded for the same reason, even though
ListenerLimits::max_pending already caps how many candidates hold engine state.
send: NonZeroUsizeThe application-to-driver payload channel (SrtSocket::send). Bounded so the
application is paced by the driver instead of queueing without limit; the driver
additionally stops draining it while the sender holds a full flow window of
unacknowledged packets (see Driver::send_window_open).
deliver: NonZeroUsizeThe driver-to-application delivery channel (SrtSocket::recv_event). A full channel
drops payloads (counted in SocketStats::deliver_dropped and reported as one coalesced
damage report once space frees); damage reports and a policy refusal are never lost.
accept: NonZeroUsizeA SrtListener’s pending-accept queue: handshakes that finished while accept was
not being polled.
Implementations§
Source§impl ChannelCapacities
impl ChannelCapacities
Sourcepub fn for_profile(profile: Profile) -> Self
pub fn for_profile(profile: Profile) -> Self
The Profile preset, replaceable through its with_* setters.
Sourcepub fn with_rx(self, rx: NonZeroUsize) -> Self
pub fn with_rx(self, rx: NonZeroUsize) -> Self
Replace Self::rx.
Sourcepub fn with_unrouted(self, unrouted: NonZeroUsize) -> Self
pub fn with_unrouted(self, unrouted: NonZeroUsize) -> Self
Replace Self::unrouted.
Sourcepub fn with_send(self, send: NonZeroUsize) -> Self
pub fn with_send(self, send: NonZeroUsize) -> Self
Replace Self::send.
Sourcepub fn with_deliver(self, deliver: NonZeroUsize) -> Self
pub fn with_deliver(self, deliver: NonZeroUsize) -> Self
Replace Self::deliver.
Sourcepub fn with_accept(self, accept: NonZeroUsize) -> Self
pub fn with_accept(self, accept: NonZeroUsize) -> Self
Replace Self::accept.