MCPcopy
hub / github.com/encode/uvicorn / ping

Method ping

uvicorn/supervisors/multiprocess.py:38–43  ·  view source on GitHub ↗
(self, timeout: float = 5)

Source from the content-addressed store, hash-verified

36 self.process = get_subprocess(config, self.target, sockets)
37
38 def ping(self, timeout: float = 5) -> bool:
39 self.parent_conn.send(b"ping")
40 if self.parent_conn.poll(timeout):
41 self.parent_conn.recv()
42 return True
43 return False
44
45 def pong(self) -> None:
46 self.child_conn.recv()

Callers 5

is_aliveMethod · 0.95
test_process_ping_pongFunction · 0.95
test_app_closeFunction · 0.80
websocket_sessionFunction · 0.80

Calls 1

sendMethod · 0.45

Tested by 4

test_process_ping_pongFunction · 0.76
test_app_closeFunction · 0.64
websocket_sessionFunction · 0.64