MCPcopy Index your code
hub / github.com/websocket-client/websocket-client / ping

Method ping

websocket/_core.py:360–371  ·  view source on GitHub ↗

Send ping data. Parameters ---------- payload: str data payload to send server.

(self, payload: Union[str, bytes] = "")

Source from the content-addressed store, hash-verified

358 return self.send(payload, ABNF.OPCODE_BINARY)
359
360 def ping(self, payload: Union[str, bytes] = ""):
361 """
362 Send ping data.
363
364 Parameters
365 ----------
366 payload: str
367 data payload to send server.
368 """
369 if isinstance(payload, str):
370 payload = payload.encode("utf-8")
371 self.send(payload, ABNF.OPCODE_PING)
372
373 def pong(self, payload: Union[str, bytes] = ""):
374 """

Callers 2

_send_pingMethod · 0.80
test_ping_pongMethod · 0.80

Calls 1

sendMethod · 0.95

Tested by 1

test_ping_pongMethod · 0.64