pub struct StreamMuxReceiver { /* private fields */ }Expand description
Receiver side of the stream multiplexer.
Implementations§
Source§impl StreamMuxReceiver
impl StreamMuxReceiver
Sourcepub fn bind<A: ToSocketAddrs>(local: A, symbol_len: usize) -> Result<Self>
pub fn bind<A: ToSocketAddrs>(local: A, symbol_len: usize) -> Result<Self>
Bind a receiver over symbol_len-byte symbols.
Sourcepub fn local_addr(&self) -> Result<SocketAddr>
pub fn local_addr(&self) -> Result<SocketAddr>
The bound local address.
Sourcepub fn fec_recovered(&self) -> u64
pub fn fec_recovered(&self) -> u64
Total symbols recovered by FEC (no retransmit) across all streams.
Sourcepub fn stream_protection(&self, stream_id: u32) -> Option<Protection>
pub fn stream_protection(&self, stream_id: u32) -> Option<Protection>
The FEC policy a stream is being received with, if it exists.
Sourcepub fn expect_stream(&mut self, stream_id: u32, protection: Protection)
pub fn expect_stream(&mut self, stream_id: u32, protection: Protection)
Declare a stream’s FEC policy on the receive side (so a Protected stream runs an RLC decoder). A stream the sender opens before this is seen defaults to Bulk.
Sourcepub fn with_stream_loss(self, stream_id: u32, pct: u32, seed: u64) -> Self
pub fn with_stream_loss(self, stream_id: u32, pct: u32, seed: u64) -> Self
Inject seeded diagnostic loss on a stream (percent of arriving symbols), to exercise recovery on loopback.
Sourcepub fn poll(&mut self) -> Result<Vec<StreamData>>
pub fn poll(&mut self) -> Result<Vec<StreamData>>
Receive any pending datagrams, run FEC recovery, and return the bytes that became deliverable on each stream (each stream independently in order).
Auto Trait Implementations§
impl Freeze for StreamMuxReceiver
impl RefUnwindSafe for StreamMuxReceiver
impl Send for StreamMuxReceiver
impl Sync for StreamMuxReceiver
impl Unpin for StreamMuxReceiver
impl UnsafeUnpin for StreamMuxReceiver
impl UnwindSafe for StreamMuxReceiver
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