Registry / networking / websocket-codec

websocket-codec

JSON →
library0.5.2rscratesunverified

A Tokio codec for the websocket protocol.

# Cargo.toml [dependencies] websocket-codec = "0.5.2"
INSTALL
IMPORT
SIG · WEBSOCKET-CODEC
W
websocket-codec
networkingrustv0.5.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WebSocketCodec
use websocket_codec::WebSocketCodec;

Creates a WebSocket codec for use with Tokio's Framed.

use websocket_codec::WebSocketCodec; use tokio_util::codec::Framed; fn main() { let codec = WebSocketCodec::new(); // Use with a TcpStream via Framed }
Debug
Known issues
gotchaRequires Tokio runtime for async I/O.
fix
Add tokio as a dependency and run with #[tokio::main].
affects: >=0.1.0
Upgrade
Version history
0.5.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
33 hits · last 30 days
node
28
OpenAI (training)
1
Resources
websocket-codec — cargo add websocket-codec · libregistry