Struct twist::server::HandshakeCodec
[−]
[src]
pub struct HandshakeCodec { /* fields omitted */ }
Codec for decoding/encoding websocket server handshake frames.
Methods
impl FrameCodec
[src]
fn stdout(&mut self, logger: Logger) -> &mut FrameCodec
Add a stdout slog Logger
to this protocol.
fn stderr(&mut self, logger: Logger) -> &mut FrameCodec
Add a stderr slog Logger
to this protocol.
fn set_ext_resp(&mut self, response: &str) -> &mut FrameCodec
Set the extension negotiation response.
Trait Implementations
impl Default for FrameCodec
[src]
fn default() -> FrameCodec
Returns the "default value" for a type. Read more
impl Decoder for FrameCodec
[src]
type Item = ClientRequest
The type of decoded frames.
type Error = Error
The type of unrecoverable frame decoding errors. Read more
fn decode(
&mut self,
buf: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
&mut self,
buf: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
fn decode_eof(
&mut self,
buf: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
&mut self,
buf: &mut BytesMut
) -> Result<Option<Self::Item>, Self::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