Struct tk_http::websocket::ServerCodec
[−]
[src]
pub struct ServerCodec;
Websocket codec for use with tk-bufstream in Codec::hijack()
This codec is used out of the box in
BufferedDispatcher::new_with_websockets
Trait Implementations
impl Encode for ServerCodec
[src]
type Item = Packet
Value to encode
fn encode(&mut self, data: Packet, buf: &mut Buf)
Encodes a frame into the buffer provided. Read more
impl Decode for ServerCodec
[src]
type Item = Packet
Decoded message
fn decode(&mut self, buf: &mut Buf) -> Result<Option<Packet>, Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
fn done(&mut self, buf: &mut Buf) -> Result<Self::Item, Error>
A default method available to be called when there are no more bytes available to be read from the underlying I/O. Read more