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

Method _sock_sendall

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 5

lenFunction · 0.85
doneMethod · 0.45
sendMethod · 0.45
set_exceptionMethod · 0.45
set_resultMethod · 0.45

Tested by

no test coverage detected