1
0
mirror of https://github.com/actix/examples synced 2024-11-27 16:02:57 +01:00
examples/websockets/echo-actorless
One 21b6cd1d36 Add rust client to echo-actorless
- Make it easier for users to find rust code they can use for the client
- Remove the need to install websocat to get cli
2024-07-21 20:26:59 -04:00
..
src Move client file from old example 2024-07-21 20:25:41 -04:00
static add actorless websocket echo example 2022-07-11 01:44:46 +01:00
Cargo.toml Add rust client to echo-actorless 2024-07-21 20:26:59 -04:00
README.md Add rust client to echo-actorless 2024-07-21 20:26:59 -04:00

Echo WebSocket (actor-less)

Simple echo websocket server using actix-ws.

Usage

Server

cd websockets/echo-actorless
cargo run --bin websocket-server
# starting HTTP server at http://localhost:8080

Browser Client

Go to http://localhost:8080 in a browser.

rust client

cd websockets/echo-actorless
cargo run --bin websocket-client

CLI Client

# using `websocat` (https://github.com/vi/websocat)
websocat -v --ping-interval=2 ws://127.0.0.1:8080/ws