(self,data)
| 73 | # Write to the IRC server. Here we just do buffering. Actual writing |
| 74 | # is performing to flush_write_buffer(). |
| 75 | def write(self,data): |
| 76 | if not self.connected: return |
| 77 | # If for some reason we can't flush the buffer to the socket, we |
| 78 | # are forced to discard it. Better to accumulate the last part |
| 79 | # of the buffer than the first one, so that it will contain more |
| 80 | # recent messages. |
| 81 | if len(self.wbuf) > 1024: self.wbuf = b'' |
| 82 | self.wbuf += data |
| 83 | |
| 84 | # Try to write our pending write buffer, if any. And leave |
| 85 | # the part we were not able to transfer to the socket still in the |
no outgoing calls
no test coverage detected