

def flush(self, include_footers=False, callback=None):
    "Flushes the current output buffer to the network.\n\n        The ``callback`` argument, if given, can be used for flow control:\n        it will be run when all flushed data has been written to the socket.\n        Note that only one flush callback can be outstanding at a time;\n        if another flush occurs before the previous flush's callback\n        has been run, the previous callback will be discarded.\n\n        .. versionchanged:: 4.0\n           Now returns a `.Future` if no callback is given.\n        "
    chunk = b''.join(self._write_buffer)
    self._write_buffer = []
    if (not self._headers_written):
        self._headers_written = True
        for transform in self._transforms:
            (self._status_code, self._headers, chunk) = transform.transform_first_chunk(self._status_code, self._headers, chunk, include_footers)
        if (self.request.method == 'HEAD'):
            chunk = None
        if hasattr(self, '_new_cookie'):
            for cookie in self._new_cookie.values():
                self.add_header('Set-Cookie', cookie.OutputString(None))
        start_line = httputil.ResponseStartLine(self.request.version, self._status_code, self._reason)
        return self.request.connection.write_headers(start_line, include_footers._headers, chunk, callback=callback)
    else:
        for transform in self._transforms:
            chunk = transform.transform_chunk(chunk, include_footers)
        if (self.request.method != 'HEAD'):
            return self.request.connection.write(chunk, callback=callback)
        else:
            future = Future()
            future.set_result(None)
            return future

dataset/ETHPy150Open RobotWebTools/rosbridge_suite/rosbridge_server/src/tornado/web.py RequestHandler.flush/VarMisuse@182/427 `self`->`include_footers`