pub struct PacketMultiplexer<P> { /* private fields */ }
Expand description

Routes packets marked with a channel header from a single Sink / Stream pair to a set of Sink / Stream pairs for each channel.

Also monitors bandwidth on each channel independently, and returns a ChannelStatistics handle to query bandwidth totals for that specific channel.

Implementations

Open a multiplexed packet channel, producing a sender for outgoing MuxPackets on this channel, and a receiver for incoming MuxPackets on this channel.

The buffer_size parameter controls the buffer size requested when creating the MPSC futures channels for the returned Sender and Receiver.

Start multiplexing packets to all opened channels.

Returns an IncomingMultiplexedPackets which is a Sink for incoming packets, and an OutgoingMultiplexedPackets which is a Stream for outgoing packets.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.