Enum tk_http::websocket::Packet [] [src]

pub enum Packet {
    Ping(Vec<u8>),
    Pong(Vec<u8>),
    Text(String),
    Binary(Vec<u8>),
    Close(u16String),
}

A websocket packet

Note: unlike Frame this has data allocated on the heap so has static lifetime

Variants

Ping packet (with data)

Pong packet (with data)

Text (utf-8) messsage

Binary message

Close message

Trait Implementations

impl Debug for Packet
[src]

Formats the value using the given formatter.

impl Clone for Packet
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more