(self)
| 460 | return len(self.buffer) > 0 |
| 461 | |
| 462 | def handle_write(self): |
| 463 | if len(self.buffer) > 0: |
| 464 | sent = self.send(self.buffer) |
| 465 | logging.debug('[{0:d}] SOCKS <= {1:d} byte(s)'.format(self.client_id, sent)) |
| 466 | self.buffer = self.buffer[sent:] |
| 467 | if self.needs_close and len(self.buffer) == 0: |
| 468 | logging.info('[{0:d}] queued browser connection close being processed, closing Browser connection'.format(self.client_id)) |
| 469 | self.needs_close = False |
| 470 | self.handle_close() |
| 471 | |
| 472 | def handle_read(self): |
| 473 | global connections |
no test coverage detected