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

Method _sock_recv_into

Lib/asyncio/selector_events.py:431–446  ·  view source on GitHub ↗
(self, fut, sock, buf)

Source from the content-addressed store, hash-verified

429 return await fut
430
431 def _sock_recv_into(self, fut, sock, buf):
432 # _sock_recv_into() can add itself as an I/O callback if the operation
433 # can't be done immediately. Don't use it directly, call
434 # sock_recv_into().
435 if fut.done():
436 return
437 try:
438 nbytes = sock.recv_into(buf)
439 except (BlockingIOError, InterruptedError):
440 return # try again next time
441 except (SystemExit, KeyboardInterrupt):
442 raise
443 except BaseException as exc:
444 fut.set_exception(exc)
445 else:
446 fut.set_result(nbytes)
447
448 async def sock_recvfrom(self, sock, bufsize):
449 """Receive a datagram from a datagram socket.

Callers

nothing calls this directly

Calls 4

doneMethod · 0.45
recv_intoMethod · 0.45
set_exceptionMethod · 0.45
set_resultMethod · 0.45

Tested by

no test coverage detected