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

Method _sock_sendto

Lib/asyncio/selector_events.py:613–626  ·  view source on GitHub ↗
(self, fut, sock, data, address)

Source from the content-addressed store, hash-verified

611 return await fut
612
613 def _sock_sendto(self, fut, sock, data, address):
614 if fut.done():
615 # Future cancellation can be scheduled on previous loop iteration
616 return
617 try:
618 n = sock.sendto(data, 0, address)
619 except (BlockingIOError, InterruptedError):
620 return
621 except (SystemExit, KeyboardInterrupt):
622 raise
623 except BaseException as exc:
624 fut.set_exception(exc)
625 else:
626 fut.set_result(n)
627
628 async def sock_connect(self, sock, address):
629 """Connect to a remote socket at address.

Callers

nothing calls this directly

Calls 4

doneMethod · 0.45
sendtoMethod · 0.45
set_exceptionMethod · 0.45
set_resultMethod · 0.45

Tested by

no test coverage detected