MCPcopy Index your code
hub / github.com/RustPython/RustPython / _sock_recv

Method _sock_recv

Lib/asyncio/selector_events.py:394–408  ·  view source on GitHub ↗
(self, fut, sock, n)

Source from the content-addressed store, hash-verified

392 self.remove_reader(fd)
393
394 def _sock_recv(self, fut, sock, n):
395 # _sock_recv() can add itself as an I/O callback if the operation can't
396 # be done immediately. Don't use it directly, call sock_recv().
397 if fut.done():
398 return
399 try:
400 data = sock.recv(n)
401 except (BlockingIOError, InterruptedError):
402 return # try again next time
403 except (SystemExit, KeyboardInterrupt):
404 raise
405 except BaseException as exc:
406 fut.set_exception(exc)
407 else:
408 fut.set_result(data)
409
410 async def sock_recv_into(self, sock, buf):
411 """Receive data from the socket.

Callers

nothing calls this directly

Calls 4

doneMethod · 0.45
recvMethod · 0.45
set_exceptionMethod · 0.45
set_resultMethod · 0.45

Tested by

no test coverage detected