[][src]Trait websocket_base::ws::sender::Sender

pub trait Sender {
    fn is_masked(&self) -> bool;

    fn send_dataframe<D, W>(
        &mut self,
        writer: &mut W,
        dataframe: &D
    ) -> WebSocketResult<()>
    where
        D: DataFrame,
        W: Write
, { ... }
fn send_message<M, W>(
        &mut self,
        writer: &mut W,
        message: &M
    ) -> WebSocketResult<()>
    where
        M: Message,
        W: Write
, { ... } }

A trait for sending data frames and messages.

Required methods

fn is_masked(&self) -> bool

Should the messages sent be masked. See the RFC for more detail.

Loading content...

Provided methods

fn send_dataframe<D, W>(
    &mut self,
    writer: &mut W,
    dataframe: &D
) -> WebSocketResult<()> where
    D: DataFrame,
    W: Write

Sends a single data frame using this sender.

fn send_message<M, W>(
    &mut self,
    writer: &mut W,
    message: &M
) -> WebSocketResult<()> where
    M: Message,
    W: Write

Sends a single message using this sender.

Loading content...

Implementors

Loading content...