mirror of
https://github.com/actix/examples
synced 2025-06-27 01:27:43 +02:00
add actorless websocket echo example
This commit is contained in:
26
websockets/echo-actorless/README.md
Normal file
26
websockets/echo-actorless/README.md
Normal file
@ -0,0 +1,26 @@
|
||||
# Echo WebSocket (actor-less)
|
||||
|
||||
Simple echo websocket server using [`actix-ws`].
|
||||
|
||||
## Usage
|
||||
|
||||
### Server
|
||||
|
||||
```sh
|
||||
cd websockets/echo-actorless
|
||||
cargo run
|
||||
# starting HTTP server at http://localhost:8080
|
||||
```
|
||||
|
||||
### Web Client
|
||||
|
||||
Go to <http://localhost:8080/> in a browser.
|
||||
|
||||
### CLI Client
|
||||
|
||||
```sh
|
||||
# using `websocat` (https://github.com/vi/websocat)
|
||||
websocat -v --ping-interval=2 ws://127.0.0.1:8080/ws
|
||||
```
|
||||
|
||||
[`actix-ws`]: https://crates.io/crates/actix-ws
|
Reference in New Issue
Block a user