Sends the specified datagram to destination over the socket. A Timeout exception will be raised if the operation is not completed by the expiration time.
(sock, data, destination, expiration)
| 747 | |
| 748 | |
| 749 | def _udp_send(sock, data, destination, expiration): |
| 750 | """Sends the specified datagram to destination over the socket. |
| 751 | A Timeout exception will be raised if the operation is not completed |
| 752 | by the expiration time. |
| 753 | """ |
| 754 | while True: |
| 755 | try: |
| 756 | if destination: |
| 757 | return sock.sendto(data, destination) |
| 758 | else: |
| 759 | return sock.send(data) |
| 760 | except BlockingIOError: # pragma: no cover |
| 761 | _wait_for_writable(sock, expiration) |
| 762 | |
| 763 | |
| 764 | def send_udp( |
no test coverage detected
searching dependent graphs…