Struct websocket::sender::Sender
[−]
[src]
pub struct Sender<W> { // some fields omitted }
A Sender that wraps a Writer and provides a default implementation using DataFrames and Messages.
Methods
impl<W> Sender<W>
fn new(writer: W, mask: bool) -> Sender<W>
Create a new WebSocketSender using the specified Writer.
fn get_ref(&self) -> &W
Returns a reference to the underlying Writer.
fn get_mut(&mut self) -> &mut W
Returns a mutable reference to the underlying Writer.
impl Sender<WebSocketStream>
fn shutdown(&mut self) -> IoResult<()>
Closes the sender side of the connection, will cause all pending and future IO to return immediately with an appropriate value.
fn shutdown_all(&mut self) -> IoResult<()>
Shuts down both Sender and Receiver, will cause all pending and future IO to return immediately with an appropriate value.