(self, data)
| 42 | # |
| 43 | |
| 44 | def feedData(self, data): |
| 45 | self.data_buf = self.data_buf + data |
| 46 | |
| 47 | offset = 0 |
| 48 | while True: |
| 49 | length = self.data_nmb.decode(self.data_buf, offset) |
| 50 | if length == 0: |
| 51 | break |
| 52 | elif length > 0: |
| 53 | offset += length |
| 54 | self._processNMBSessionPacket(self.data_nmb) |
| 55 | else: |
| 56 | raise NMBError |
| 57 | |
| 58 | if offset > 0: |
| 59 | self.data_buf = self.data_buf[offset:] |
| 60 | |
| 61 | def sendNMBMessage(self, data): |
| 62 | self.sendNMBPacket(SESSION_MESSAGE, data) |
no test coverage detected