pub trait Message: Sized {
    fn serialize(&self, _: &mut dyn Write, masked: bool) -> WebSocketResult<()>;
    fn message_size(&self, masked: bool) -> usize;
    fn from_dataframes<D: DataFrameable>(
        frames: Vec<D>
    ) -> WebSocketResult<Self>; }
Expand description

A trait for WebSocket messages

Required Methods

Writes this message to the writer

Returns how many bytes this message will take up

Attempt to form a message from a series of data frames

Implementors