(self)
| 85 | # the part we were not able to transfer to the socket still in the |
| 86 | # buffer for the next time. |
| 87 | def flush_write_buffer(self): |
| 88 | while True: |
| 89 | if len(self.wbuf) == 0: return |
| 90 | try: |
| 91 | written = self.socket.write(self.wbuf) |
| 92 | if written == 0: return |
| 93 | self.wbuf = self.wbuf[written:] |
| 94 | except: |
| 95 | # Handle socket errors in the read path. |
| 96 | return |
| 97 | |
| 98 | # Write a message into the bot channel |
| 99 | def reply(self,reply): |