Crate twist [] [src]

An implementation of the RFC6455 websocket protocol as a set of tokio Codec anda tokio-proto pipeline ServerProto

Basic Usage

use twist::proto::Frame;
use tokio_proto::TcpServer;

let ws_proto: Frame = Default::default();
let server = TcpServer::new(ws_proto, unenc_socket_addr);

Structs

BaseFrame

A websocket base frame.

BaseFrameCodec

Codec for dedoding/encoding websocket base frames.

HanshakeCodec

Codec for decoding/encoding websocket handshake frames.

TwistCodec

Codec for use with the WebSocketProtocol. Used when decoding/encoding of both websocket handshakes and websocket base frames.

WebSocketFrame

A twist websocket frame. Note a websocket frame is either a handshake frame or a base frame. They are mutually exclusive.

WebSocketProtocol

The protocol that you should run a tokio-proto TcpServer with to handle websocket handshake and base frames.

Enums

OpCode

Operation codes defined in RFC6455.