close
The Wayback Machine - https://web.archive.org/web/20220408135832/https://github.com/rerun-io/ewebsock
Skip to content
main
Switch branches/tags
Code

ewebsock

github Latest version Documentation unsafe forbidden Build Status MIT Apache

This is a simple WebSocket library for Rust which can be compiled to both native and 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);
}

Testing

Locally:

cargo run -p example_app

Web:

./example_app/start_server.sh &
./example_app/build_web.sh --open

About

A Rust Websocket client that compiles to both native and web

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published