(self, channel, cmd, data)
| 354 | #log('outbuf: %d %r\n' % (self.amount_queued(), ob)) |
| 355 | |
| 356 | def send(self, channel, cmd, data): |
| 357 | data = str(data) |
| 358 | assert(len(data) <= 65535) |
| 359 | p = struct.pack('!ccHHH', 'S', 'S', channel, cmd, len(data)) + data |
| 360 | self.outbuf.append(p) |
| 361 | debug2(' > channel=%d cmd=%s len=%d (fullness=%d)\n' |
| 362 | % (channel, cmd_to_name.get(cmd,hex(cmd)), |
| 363 | len(data), self.fullness)) |
| 364 | self.fullness += len(data) |
| 365 | |
| 366 | def got_packet(self, channel, cmd, data): |
| 367 | debug2('< channel=%d cmd=%s len=%d\n' |
no test coverage detected