Read all remaining data in the packet. (Subsequent read() will return errors.)
(self)
| 74 | return result |
| 75 | |
| 76 | def read_all(self): |
| 77 | """Read all remaining data in the packet. |
| 78 | |
| 79 | (Subsequent read() will return errors.) |
| 80 | """ |
| 81 | result = self._data[self._position :] |
| 82 | self._position = None # ensure no subsequent read() |
| 83 | return result |
| 84 | |
| 85 | def advance(self, length): |
| 86 | """Advance the cursor in data buffer 'length' bytes.""" |
no outgoing calls