Crates.io | ezsockets |
lib.rs | ezsockets |
version | 0.6.4 |
source | src |
created_at | 2022-03-23 20:08:18.575894 |
updated_at | 2024-09-07 10:39:28.685676 |
description | WebSockets server & client made easy |
homepage | |
repository | https://github.com/gbaranski/ezsockets |
max_upload_size | |
id | 555382 |
size | 152,832 |
Creating a WebSocket server or a client in Rust can be troublesome. This crate facilitates this process by providing:
rustls
and native-tls
.View the full documentation at docs.rs/ezsockets
simple-client
- a simplest WebSocket client which uses stdin as input.
echo-server
- server that echoes back every message it receives.
echo-server
- same as echo-server
, but with native-tls
.
counter-server
- server that increments global value every second and shares it with client
chat-client
- chat client for chat-server
and chat-server-axum
examples
wasm-client
- chat client for chat-server
and chat-server-axum
examples that runs in the browser (only listens to the chat)
chat-server
- chat server with support of rooms
chat-server-axum
- same as above, but using axum
as a back-end
By default clients use tokio-tungstenite
under the hood. Disable default features and enable wasm_client
to run clients on WASM targets.
See examples/simple-client for a simple usage and docs.rs/ezsockets/server for documentation.
WebSocket server can use one of the supported back-ends:
tokio-tungstenite
- the simplest way to get started.axum
- ergonomic and modular web framework built with Tokio, Tower, and Hyperactix-web
- Work in progress at #22See examples/echo-server for a simple usage and docs.rs/ezsockets/server for documentation.
Licensed under MIT.
Reach me out on Discord gbaranski#5119
, or mail me at me@gbaranski.com.