MCPcopy Create free account
hub / github.com/apache/arrow / find_free_port

Function find_free_port

python/pyarrow/util.py:197–202  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

195
196
197def find_free_port():
198 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
199 with contextlib.closing(sock) as sock:
200 sock.bind(('', 0))
201 sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
202 return sock.getsockname()[1]
203
204
205def guid():

Callers 6

test_uwsgi_integrationFunction · 0.90
s3_connectionFunction · 0.90
gcs_serverFunction · 0.90
azure_serverFunction · 0.90

Calls

no outgoing calls

Tested by 6

test_uwsgi_integrationFunction · 0.72
s3_connectionFunction · 0.72
gcs_serverFunction · 0.72
azure_serverFunction · 0.72