MCPcopy Create free account
hub / github.com/NVIDIA/cuda-quantum / check_server_connection

Function check_server_connection

python/tests/backends/network_utils.py:13–20  ·  view source on GitHub ↗
(port, retries=120, delay=1)

Source from the content-addressed store, hash-verified

11
12
13def check_server_connection(port, retries=120, delay=1):
14 for _ in range(retries):
15 try:
16 with socket.create_connection(("localhost", port), timeout=1):
17 return True
18 except OSError:
19 time.sleep(delay)
20 return False

Callers 9

setup_scalewayFunction · 0.90
startUpMockServerFunction · 0.90
startUpMockServerFunction · 0.90
quantinuum_mock_serverFunction · 0.90
startUpMockServerFunction · 0.90
startUpMockServerFunction · 0.90
startUpMockServerFunction · 0.90
startUpMockServerFunction · 0.90
startUpMockServerFunction · 0.90

Calls 1

rangeFunction · 0.50

Tested by 9

setup_scalewayFunction · 0.72
startUpMockServerFunction · 0.72
startUpMockServerFunction · 0.72
quantinuum_mock_serverFunction · 0.72
startUpMockServerFunction · 0.72
startUpMockServerFunction · 0.72
startUpMockServerFunction · 0.72
startUpMockServerFunction · 0.72
startUpMockServerFunction · 0.72