tokio-tungstenite dropped connection test
Open three terminals
- In terminal 1,
cargo run -- debug server
- In terminal 2,
cargo run -- debug client
- Observe monotonic counter being sent over WebSocket
- In terminal 3,
sudo iptables -A INPUT -p tcp --dport 1337 -j DROP
- Observe absense of monotonic counter reaching the server
- Wait...
- Note how the server never terminates the client's connection.
- Go ahead and C-c the process in terminal 2 to kill the client.
- In terminal 3,
sudo iptables -D INPUT -p tcp --dport 1337 -j DROP
to remove firewall rule