(self, data: bytes, flags: int = 0)
| 99 | return self.read(nbytes, buffer) |
| 100 | |
| 101 | def sendall(self, data: bytes, flags: int = 0) -> None: |
| 102 | if flags != 0: |
| 103 | raise ValueError("non-zero flags not allowed in calls to sendall") |
| 104 | count = 0 |
| 105 | with memoryview(data) as view, view.cast("B") as byte_view: |
| 106 | amount = len(byte_view) |
| 107 | while count < amount: |
| 108 | v = self.send(byte_view[count:]) |
| 109 | count += v |
| 110 | |
| 111 | def send(self, data: bytes, flags: int = 0) -> int: |
| 112 | if flags != 0: |