def flush(self):
<EOL>if self.__bufferidx == <NUM_LIT:0>:<EOL><INDENT>return <EOL><DEDENT>self.conn.send("<STR_LIT>" % hex(self.__bufferidx)[<NUM_LIT:2>:])<EOL>self.conn.send("<STR_LIT>" % '<STR_LIT>'.join(self.__buffer[<NUM_LIT:0>:self.__bufferidx]))<EOL>self.__bufferidx = <NUM_LIT:0><EOL>
Flushes the buffer to socket. Only call when the write is done. Calling flush after each write will prevent the buffer to act as efficiently as possible