MCPcopy Index your code
hub / github.com/python/cpython / receive

Function receive

Lib/test/test_socketserver.py:39–44  ·  view source on GitHub ↗
(sock, n, timeout=test.support.SHORT_TIMEOUT)

Source from the content-addressed store, hash-verified

37_real_select = select.select
38
39def receive(sock, n, timeout=test.support.SHORT_TIMEOUT):
40 r, w, x = _real_select([sock], [], [], timeout)
41 if sock in r:
42 return sock.recv(n)
43 else:
44 raise RuntimeError("timed out on %r" % (sock,))
45
46
47@warnings_helper.ignore_fork_in_thread_deprecation_warnings()

Callers 2

stream_examineMethod · 0.85
dgram_examineMethod · 0.85

Calls 1

recvMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…