End the stream. :meth:`feed_eof` cannot be called more than once. Raises: EOFError: If the stream has ended.
(self)
| 130 | self.buffer += data |
| 131 | |
| 132 | def feed_eof(self) -> None: |
| 133 | """ |
| 134 | End the stream. |
| 135 | |
| 136 | :meth:`feed_eof` cannot be called more than once. |
| 137 | |
| 138 | Raises: |
| 139 | EOFError: If the stream has ended. |
| 140 | |
| 141 | """ |
| 142 | if self.eof: |
| 143 | raise EOFError("stream ended") |
| 144 | self.eof = True |
| 145 | |
| 146 | def discard(self) -> None: |
| 147 | """ |
no outgoing calls