[−][src]Function websocket::async::futures::unsync::mpsc::channel
pub fn channel<T>(buffer: usize) -> (Sender<T>, Receiver<T>)
Creates a bounded in-memory channel with buffered storage.
This method creates concrete implementations of the Stream
and Sink
traits which can be used to communicate a stream of values between tasks
with backpressure. The channel capacity is exactly buffer
. On average,
sending a message through this channel performs no dynamic allocation.