MWE: Axum WebSocket echo server
This is a minimum working example (MWE) of a WebSocket echo server in Rust
using axum
and tokio
.
The HTTPS handshake happens on the same route (/
) as the WebSocket connection.
This MWE uses the following dependencies in Cargo.toml
:
The following resides in src/main.rs
: