Struct tk_http::websocket::ClientCodec
[−]
[src]
pub struct ClientCodec;
Websocket codec for use with tk-bufstream
This codec is used out of the box in HandshakeProto
Trait Implementations
impl Encode for ClientCodec
[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 ClientCodec
[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