Add WebSocket ping/pong keep-alive mechanism

Implements RFC 6455 compliant ping/pong health checking to detect dead connections:
- Send ping frames every 10 seconds
- Monitor pong responses with 5-second timeout after each ping
This commit is contained in:
Alexandr Stelnykovych
2025-11-21 12:28:57 +02:00
parent 0b20a368f9
commit 76214bd986
3 changed files with 43 additions and 0 deletions

View File

@@ -42,6 +42,7 @@ tokio = { version = "1.44.2", features = ["macros"] }
cached = "0.46.1"
notify-rust = "4.10.0"
assert_matches = "1.5.0"
bytes = "1.5"
tokio-websockets = { version = "0.5.0", features = ["client", "ring", "rand"] }
sha = "1.0.3"
http = "1.0.0"