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

Method _sock_sendto

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

Source from the content-addressed store, hash-verified

608 return await fut
609
610 def _sock_sendto(self, fut, sock, data, address):
611 if fut.done():
612 # Future cancellation can be scheduled on previous loop iteration
613 return
614 try:
615 n = sock.sendto(data, 0, address)
616 except (BlockingIOError, InterruptedError):
617 return
618 except (SystemExit, KeyboardInterrupt):
619 raise
620 except BaseException as exc:
621 fut.set_exception(exc)
622 else:
623 fut.set_result(n)
624
625 async def sock_connect(self, sock, address):
626 """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