diff --git a/websockets/chat-tcp/src/main.rs b/websockets/chat-tcp/src/main.rs index 27cfccf..c6d3235 100644 --- a/websockets/chat-tcp/src/main.rs +++ b/websockets/chat-tcp/src/main.rs @@ -195,7 +195,7 @@ impl StreamHandler> for WsChatSession { } impl WsChatSession { - /// helper method that sends ping to client every second. + /// helper method that sends ping to client every 5 seconds (HEARTBEAT_INTERVAL). /// /// also this method checks heartbeats from client fn hb(&self, ctx: &mut ws::WebsocketContext) { diff --git a/websockets/chat/src/session.rs b/websockets/chat/src/session.rs index ce3f418..72f6a3c 100644 --- a/websockets/chat/src/session.rs +++ b/websockets/chat/src/session.rs @@ -31,7 +31,7 @@ pub struct WsChatSession { } impl WsChatSession { - /// helper method that sends ping to client every second. + /// helper method that sends ping to client every 5 seconds (HEARTBEAT_INTERVAL). /// /// also this method checks heartbeats from client fn hb(&self, ctx: &mut ws::WebsocketContext) { diff --git a/websockets/echo/src/server.rs b/websockets/echo/src/server.rs index 9ae6df6..e262eb7 100644 --- a/websockets/echo/src/server.rs +++ b/websockets/echo/src/server.rs @@ -22,7 +22,7 @@ impl MyWebSocket { Self { hb: Instant::now() } } - /// helper method that sends ping to client every second. + /// helper method that sends ping to client every 5 seconds (HEARTBEAT_INTERVAL). /// /// also this method checks heartbeats from client fn hb(&self, ctx: &mut ::Context) {