Expand description

A WebSocket client library that can be compiled to both native and the web (WASM).

Usage:

let (mut sender, receiver) = ewebsock::connect("ws://example.com").unwrap();
sender.send(ewebsock::WsMessage::Text("Hello!".into()));
while let Some(event) = receiver.try_recv() {
    println!("Received {:?}", event);
}

Re-exports

pub use native_tungstenite::*;

Modules

Structs

Enums

Something happening with the connection.

A web-socket message.

Functions

The easiest to use function.

Like connect, but will call the given wake-up function on each incoming event.

Type Definitions