MCPcopy Create free account
hub / github.com/Apress/practical-rust-web-projects / Server

Class Server

Ch04/websocket/examples/unresponsive_timer.rs:13–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11const CLIENT_UNRESPONSIVE: Token = Token(1);
12
13struct Server {
14 out: Sender,
15 ping_timeout: Option<Timeout>,
16 client_unresponsive_timeout: Option<Timeout>,
17}
18impl Handler for Server {
19 fn on_open(&mut self, _: Handshake) -> Result<()> {
20 println!("Opened a connetion");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected