From dc7623694c186c6d9fd2539ff413d5c126458a2d Mon Sep 17 00:00:00 2001 From: Ifa Date: Fri, 5 Aug 2022 18:11:18 +0200 Subject: [PATCH] fix comments (#568) --- websockets/chat-tcp/src/main.rs | 2 +- websockets/chat/src/session.rs | 2 +- websockets/echo/src/server.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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) {