chromium/net/test/embedded_test_server/http2_connection.h

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef NET_TEST_EMBEDDED_TEST_SERVER_HTTP2_CONNECTION_H_
#define NET_TEST_EMBEDDED_TEST_SERVER_HTTP2_CONNECTION_H_

#include <memory>
#include <queue>
#include <string>

#include "base/containers/flat_map.h"
#include "base/containers/flat_set.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/memory/weak_ptr.h"
#include "net/base/io_buffer.h"
#include "net/test/embedded_test_server/embedded_test_server_connection_listener.h"
#include "net/test/embedded_test_server/http_connection.h"
#include "net/test/embedded_test_server/http_request.h"
#include "net/third_party/quiche/src/quiche/http2/adapter/http2_visitor_interface.h"
#include "net/third_party/quiche/src/quiche/http2/adapter/oghttp2_adapter.h"

namespace net::test_server {

StreamId;
StreamMap;

class EmbeddedTestServer;

// Outside of the text/binary (which is just a drop-in parser/decoder
// replacement) the main difference from Http1Connection is that multiple
// request/response "streams" can exist on the same connection, which means
// connections don't open on first request and don't close on first response
class Http2Connection : public HttpConnection,
                        public http2::adapter::Http2VisitorInterface {};

}  // namespace net::test_server

#endif  // NET_TEST_EMBEDDED_TEST_SERVER_HTTP2_CONNECTION_H_