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

Method _sock_sendall

Lib/asyncio/selector_events.py:564–584  ·  view source on GitHub ↗
(self, fut, sock, view, pos)

Source from the content-addressed store, hash-verified

562 return await fut
563
564 def _sock_sendall(self, fut, sock, view, pos):
565 if fut.done():
566 # Future cancellation can be scheduled on previous loop iteration
567 return
568 start = pos[0]
569 try:
570 n = sock.send(view[start:])
571 except (BlockingIOError, InterruptedError):
572 return
573 except (SystemExit, KeyboardInterrupt):
574 raise
575 except BaseException as exc:
576 fut.set_exception(exc)
577 return
578
579 start += n
580
581 if start == len(view):
582 fut.set_result(None)
583 else:
584 pos[0] = start
585
586 async def sock_sendto(self, sock, data, address):
587 """Send data to the socket.

Callers

nothing calls this directly

Calls 4

doneMethod · 0.45
sendMethod · 0.45
set_exceptionMethod · 0.45
set_resultMethod · 0.45

Tested by

no test coverage detected