MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / ping

Method ping

nodedb-client/src/native/connection/mod.rs:215–221  ·  view source on GitHub ↗

Send a ping and await the pong.

(&mut self)

Source from the content-addressed store, hash-verified

213
214 /// Send a ping and await the pong.
215 pub async fn ping(&mut self) -> NodeDbResult<()> {
216 let resp = self.send(OpCode::Ping, TextFields::default()).await?;
217 if resp.status == ResponseStatus::Error {
218 return Err(NodeDbError::internal("ping failed"));
219 }
220 Ok(())
221 }
222
223 /// Whether this connection has been authenticated.
224 pub fn is_authenticated(&self) -> bool {

Callers

nothing calls this directly

Calls 2

internalFunction · 0.50
sendMethod · 0.45

Tested by

no test coverage detected