Struct interceptor::mock::mock_stream::MockStream [−][src]
pub struct MockStream { /* fields omitted */ }Expand description
MockStream is a helper struct for testing interceptors.
Implementations
pub async fn new(
info: &StreamInfo,
interceptor: Arc<dyn Interceptor + Send + Sync>
) -> Arc<Self>
pub async fn new(
info: &StreamInfo,
interceptor: Arc<dyn Interceptor + Send + Sync>
) -> Arc<Self>
new creates a new MockStream
write_rtcp writes a batch of rtcp packet to the stream, using the interceptor
write_rtp writes an rtp packet to the stream, using the interceptor
receive_rtcp schedules a new rtcp batch, so it can be read be the stream
receive_rtp schedules a rtp packet, so it can be read be the stream
written_rtcp returns a channel containing the rtcp batches written, modified by the interceptor
written_rtp returns a channel containing rtp packets written, modified by the interceptor
read_rtcp returns a channel containing the rtcp batched read, modified by the interceptor
read_rtp returns a channel containing the rtp packets read, modified by the interceptor
Trait Implementations
read a batch of rtcp packets
fn write<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
pkts: &'life1 [Box<dyn Packet + Send + Sync>],
_attributes: &'life2 Attributes
) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn write<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
pkts: &'life1 [Box<dyn Packet + Send + Sync>],
_attributes: &'life2 Attributes
) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
write a batch of rtcp packets
read a rtp packet