[][src]Module websocket::codec::ws

Send websocket messages and dataframes asynchronously.

This module provides codecs that can be be used with tokio to create asynchronous streams that can serialize/deserialize websocket messages (and dataframes for users that want low level control).

For websocket messages, see the documentation for MessageCodec, for dataframes see the documentation for DataFrameCodec

Structs

DataFrameCodec

A codec for decoding and encoding websocket dataframes.

MessageCodec

A codec for asynchronously decoding and encoding websocket messages.

Enums

Context

Even though a websocket connection may look perfectly symmetrical in reality there are small differences between clients and servers. This type is passed to the codecs to inform them of what role they are in (i.e. that of a Client or Server).