chromium/net/quic/quic_proxy_datagram_client_socket.h

// Copyright 2024 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_QUIC_QUIC_PROXY_DATAGRAM_CLIENT_SOCKET_H_
#define NET_QUIC_QUIC_PROXY_DATAGRAM_CLIENT_SOCKET_H_

#include <stdint.h>

#include <queue>
#include <string_view>

#include "net/base/ip_endpoint.h"
#include "net/base/net_export.h"
#include "net/log/net_log.h"
#include "net/log/net_log_with_source.h"
#include "net/quic/quic_chromium_client_session.h"
#include "net/quic/quic_chromium_client_stream.h"
#include "net/socket/datagram_client_socket.h"
#include "net/socket/udp_socket.h"
#include "net/spdy/spdy_http_utils.h"
#include "net/third_party/quiche/src/quiche/common/http/http_header_block.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "url/scheme_host_port.h"

namespace net {

class ProxyDelegate;

// A client socket that uses a QUIC proxy as the transport layer.
//
// Given that DatagramClientSocket class contains numerous methods tailored for
// UDP, many methods from DatagramClientSocket are left as stubs.
// ConnectViaStream is used to connect this socket over the provided QUIC stream
// to send and receive datagrams.
class NET_EXPORT_PRIVATE QuicProxyDatagramClientSocket
    : public DatagramClientSocket,
      public quic::QuicSpdyStream::Http3DatagramVisitor {};

}  // namespace net

#endif  // NET_QUIC_QUIC_PROXY_DATAGRAM_CLIENT_SOCKET_H_