Initialize the packet decoder
(self)
| 96 | each packet, then extracts and returns the payload. |
| 97 | """ |
| 98 | def __init__(self): |
| 99 | """ |
| 100 | Initialize the packet decoder |
| 101 | """ |
| 102 | self.state = 'WAIT_FOR_HEADER' |
| 103 | self.payload = bytearray() |
| 104 | self.expected_length = 0 |
| 105 | |
| 106 | def parse_byte(self, byte): |
| 107 | """ |