#include "quiche/quic/masque/masque_encapsulated_client.h"
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include "absl/memory/memory.h"
#include "absl/strings/string_view.h"
#include "quiche/quic/core/crypto/proof_verifier.h"
#include "quiche/quic/core/io/quic_event_loop.h"
#include "quiche/quic/core/quic_connection.h"
#include "quiche/quic/core/quic_constants.h"
#include "quiche/quic/core/quic_packet_writer.h"
#include "quiche/quic/core/quic_server_id.h"
#include "quiche/quic/core/quic_session.h"
#include "quiche/quic/core/quic_types.h"
#include "quiche/quic/core/quic_versions.h"
#include "quiche/quic/masque/masque_client.h"
#include "quiche/quic/masque/masque_client_session.h"
#include "quiche/quic/masque/masque_encapsulated_client_session.h"
#include "quiche/quic/masque/masque_utils.h"
#include "quiche/quic/platform/api/quic_ip_address.h"
#include "quiche/quic/platform/api/quic_logging.h"
#include "quiche/quic/platform/api/quic_socket_address.h"
#include "quiche/quic/tools/quic_client_default_network_helper.h"
#include "quiche/quic/tools/quic_default_client.h"
#include "quiche/quic/tools/quic_name_lookup.h"
#include "quiche/common/platform/api/quiche_logging.h"
#include "quiche/common/quiche_data_reader.h"
#include "quiche/common/quiche_data_writer.h"
namespace quic {
namespace {
class ChecksumWriter { … };
class MasquePacketWriter : public QuicPacketWriter { … };
class MasqueClientDefaultNetworkHelper : public QuicClientDefaultNetworkHelper { … };
}
std::unique_ptr<MasqueEncapsulatedClient> MasqueEncapsulatedClient::Create(
QuicSocketAddress server_address, const QuicServerId& server_id,
const std::string& uri_template, MasqueMode masque_mode,
QuicEventLoop* event_loop, std::unique_ptr<ProofVerifier> proof_verifier,
MasqueClient* underlying_masque_client) { … }
MasqueEncapsulatedClient::MasqueEncapsulatedClient(
QuicSocketAddress server_address, const QuicServerId& server_id,
QuicEventLoop* event_loop, std::unique_ptr<ProofVerifier> proof_verifier,
MasqueClient* masque_client)
: … { … }
MasqueEncapsulatedClient::MasqueEncapsulatedClient(
QuicSocketAddress server_address, const QuicServerId& server_id,
MasqueMode masque_mode, QuicEventLoop* event_loop,
std::unique_ptr<ProofVerifier> proof_verifier, MasqueClient* masque_client,
const std::string& uri_template)
: … { … }
MasqueEncapsulatedClient::~MasqueEncapsulatedClient() { … }
std::unique_ptr<QuicSession> MasqueEncapsulatedClient::CreateQuicClientSession(
const ParsedQuicVersionVector& supported_versions,
QuicConnection* connection) { … }
MasqueEncapsulatedClientSession*
MasqueEncapsulatedClient::masque_encapsulated_client_session() { … }
QuicByteCount MaxPacketSizeForEncapsulatedConnections(
MasqueClient* underlying_masque_client) { … }
QuicConfig MasqueEncapsulatedConfig(MasqueClient* underlying_masque_client) { … }
}