Send websocket pings from both the client and the server
Remove the client-only logic for sending protobuf pings. Co-Authored-By: Nathan Sobo <nathan@zed.dev> Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
parent
c61a1bd659
commit
9017a1363b
9 changed files with 174 additions and 92 deletions
|
@ -318,6 +318,13 @@ where
|
|||
self.stream.send(WebSocketMessage::Binary(buffer)).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn ping(&mut self) -> Result<(), WebSocketError> {
|
||||
self.stream
|
||||
.send(WebSocketMessage::Ping(Default::default()))
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
impl<S> MessageStream<S>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue