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

Method run

Lib/test/test_io/test_largefile.py:221–231  ·  view source on GitHub ↗
(sock)

Source from the content-addressed store, hash-verified

219
220 def tcp_server(self, sock):
221 def run(sock):
222 with sock:
223 conn, _ = sock.accept()
224 conn.settimeout(self.timeout)
225 with conn, open(TESTFN2, 'wb') as f:
226 event.wait(self.timeout)
227 while True:
228 chunk = conn.recv(65536)
229 if not chunk:
230 return
231 f.write(chunk)
232
233 event = threading.Event()
234 sock.settimeout(self.timeout)

Callers

nothing calls this directly

Calls 6

openFunction · 0.50
acceptMethod · 0.45
settimeoutMethod · 0.45
waitMethod · 0.45
recvMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected