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