Skip to content

Commit

Permalink
Improve docs for ping handling on ws filter (seanmonstar#839)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xdeafbeef committed Jun 15, 2021
1 parent 316f568 commit 676d83f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/filters/ws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ fn on_upgrade() -> impl Filter<Extract = (Option<OnUpgrade>,), Error = Rejection
/// Ping messages sent from the client will be handled internally by replying with a Pong message.
/// Close messages need to be handled explicitly: usually by closing the `Sink` end of the
/// `WebSocket`.
///
/// **Note!**
/// Due to rust futures nature, pings won't be handled until read part of `WebSocket` is polled

pub struct WebSocket {
inner: WebSocketStream<hyper::upgrade::Upgraded>,
}
Expand Down

0 comments on commit 676d83f

Please sign in to comment.