(self, fut, sock, n)
| 395 | self.remove_reader(fd) |
| 396 | |
| 397 | def _sock_recv(self, fut, sock, n): |
| 398 | # _sock_recv() can add itself as an I/O callback if the operation can't |
| 399 | # be done immediately. Don't use it directly, call sock_recv(). |
| 400 | if fut.done(): |
| 401 | return |
| 402 | try: |
| 403 | data = sock.recv(n) |
| 404 | except (BlockingIOError, InterruptedError): |
| 405 | return # try again next time |
| 406 | except (SystemExit, KeyboardInterrupt): |
| 407 | raise |
| 408 | except BaseException as exc: |
| 409 | fut.set_exception(exc) |
| 410 | else: |
| 411 | fut.set_result(data) |
| 412 | |
| 413 | async def sock_recv_into(self, sock, buf): |
| 414 | """Receive data from the socket. |
nothing calls this directly
no test coverage detected