mirror of
https://github.com/actix/examples
synced 2024-11-23 22:41:07 +01:00
fix comments (#568)
This commit is contained in:
parent
7a036d97b9
commit
dc7623694c
@ -195,7 +195,7 @@ impl StreamHandler<Result<ws::Message, ws::ProtocolError>> for WsChatSession {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl 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
|
/// also this method checks heartbeats from client
|
||||||
fn hb(&self, ctx: &mut ws::WebsocketContext<Self>) {
|
fn hb(&self, ctx: &mut ws::WebsocketContext<Self>) {
|
||||||
|
@ -31,7 +31,7 @@ pub struct WsChatSession {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl 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
|
/// also this method checks heartbeats from client
|
||||||
fn hb(&self, ctx: &mut ws::WebsocketContext<Self>) {
|
fn hb(&self, ctx: &mut ws::WebsocketContext<Self>) {
|
||||||
|
@ -22,7 +22,7 @@ impl MyWebSocket {
|
|||||||
Self { hb: Instant::now() }
|
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
|
/// also this method checks heartbeats from client
|
||||||
fn hb(&self, ctx: &mut <Self as Actor>::Context) {
|
fn hb(&self, ctx: &mut <Self as Actor>::Context) {
|
||||||
|
Loading…
Reference in New Issue
Block a user