Skip to main content

Crate websock

Crate websock 

Source
Expand description

WebSocket library for native and WebAssembly targets.

§Features

  • Native (tokio-tungstenite) support on non-wasm targets
  • Browser WebSocket support on wasm32 targets

Modules§

crypto
Simple crypto provider utilities for rustls.
stream
Sink/Stream split helpers for Tokio Tungstenite connections.
tls
TLS configuration helpers for managing certificates and private keys.

Structs§

Bytes
A cheaply cloneable and sliceable chunk of contiguous memory.
Client
Reusable WebSocket client created by ClientBuilder.
ClientBuilder
Builder for creating a WebSocket client.
CloseFrame
Close frame metadata associated with WebSocket close events.
ConnectOptions
Connection configuration shared by native and WebAssembly transports.
Connection
WebSocket connection wrapper around a Tokio Tungstenite stream.
DangerousClientBuilder
Builder that can create clients with disabled certificate verification.
Server
WebSocket server listener.
ServerBuilder
Builder for creating a WebSocket server.
ServerOptions
Server configuration shared by native transports.

Enums§

Error
Errors that can occur when sending or receiving WebSocket messages.
Message
WebSocket message representation used by websock.

Traits§

WebSocketConnection
Cross-platform WebSocket connection contract.

Functions§

default_ws_alpn

Type Aliases§

LocalBoxFuture
Local boxed future used by transport traits.
Result
Result type for protocol and transport operations.