pub struct NackResponderInterceptor { /* private fields */ }Expand description
Interceptor that responds to NACK requests by retransmitting packets.
This interceptor buffers outgoing RTP packets on local streams and retransmits them when RTCP TransportLayerNack packets are received.
Implementations§
Source§impl NackResponderInterceptor
impl NackResponderInterceptor
Sourcepub fn next_release(&mut self) -> Option<Instant>
pub fn next_release(&mut self) -> Option<Instant>
When the oldest waiting retransmission fits the rate limit: the instant enough of the
window’s packets have left it. None with nothing waiting, without a target to wait
for, or while the stream’s budget waits for an original packet (the write of that
packet tries again).
Trait Implementations§
Source§impl Interceptor for NackResponderInterceptor
impl Interceptor for NackResponderInterceptor
Source§fn bind_local_stream(&mut self, info: &StreamInfo)
fn bind_local_stream(&mut self, info: &StreamInfo)
Source§fn unbind_local_stream(&mut self, info: &StreamInfo)
fn unbind_local_stream(&mut self, info: &StreamInfo)
Source§fn bind_remote_stream(&mut self, _info: &StreamInfo)
fn bind_remote_stream(&mut self, _info: &StreamInfo)
Source§fn unbind_remote_stream(&mut self, _info: &StreamInfo)
fn unbind_remote_stream(&mut self, _info: &StreamInfo)
Source§fn with<O, F>(self, f: F) -> O
fn with<O, F>(self, f: F) -> O
f, for nested (#[next]-field)
interceptors written with the Interceptor derive. The result is an
ordinary interceptor and can be placed in a Registry slot. Read moreSource§fn move_local_stream_out(&mut self, info: &StreamInfo)
fn move_local_stream_out(&mut self, info: &StreamInfo)
info moves to another RTP session (its m= section moved to another
transport, as a bundling answer does): it leaves this one without ending, so nothing
says it left (no RTCP BYE, RFC 3550 section 6.6). Unbinds it by default.Source§impl Protocol<TransportMessage<AttributedPacket>, TransportMessage<AttributedPacket>, ()> for NackResponderInterceptor
impl Protocol<TransportMessage<AttributedPacket>, TransportMessage<AttributedPacket>, ()> for NackResponderInterceptor
Source§fn poll_timeout(&mut self) -> Option<Self::Time>
fn poll_timeout(&mut self) -> Option<Self::Time>
Due at once while packets wait in the write queue. A retransmission or a probe cluster’s
padding is made on the read leg (a NACK, a ProbeRequest), which a driver reaches
after its poll_write (poll_write, poll_event, poll_read, then poll_timeout
and sleep, as the crate’s event loop has it): without a deadline the packets would wait
for whatever wakes the driver next, a timer or an incoming datagram, which can be a
long time on a connection with little traffic. The deadline is the instant they were
made, so the driver’s handle_timeout and the poll_write after it take them out at
once; it is gone when the queue is drained.
A retransmission the rate limit holds back is not in the write queue: its deadline is
the instant the limit next has room for it (Self::next_release), never earlier (a
driver woken at once would spin), and the same for a waiting request running out and
the reserve falling back to zero.