def pipe_error(self, client_buffer): client_buffer.size = self.error.size return tee(self.error.reader, client_buffer.writer, self.error.size)
def pipe_response(self, request_parser, client_buffer): response_buffer = self.available_cache[self.hash_func(request_parser)] client_buffer.size = response_buffer.size return tee(response_buffer.reader, client_buffer.writer, response_buffer.size)