#include "net/tools/quic/quic_simple_server.h"
#include <string.h>
#include <memory>
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "net/base/ip_endpoint.h"
#include "net/base/net_errors.h"
#include "net/log/net_log_source.h"
#include "net/quic/address_utils.h"
#include "net/socket/udp_server_socket.h"
#include "net/third_party/quiche/src/quiche/quic/core/crypto/crypto_handshake.h"
#include "net/third_party/quiche/src/quiche/quic/core/crypto/quic_random.h"
#include "net/third_party/quiche/src/quiche/quic/core/quic_crypto_stream.h"
#include "net/third_party/quiche/src/quiche/quic/core/quic_data_reader.h"
#include "net/third_party/quiche/src/quiche/quic/core/quic_packets.h"
#include "net/third_party/quiche/src/quiche/quic/tools/quic_simple_dispatcher.h"
#include "net/tools/quic/quic_simple_server_packet_writer.h"
#include "net/tools/quic/quic_simple_server_session_helper.h"
#include "net/tools/quic/quic_simple_server_socket.h"
namespace net {
namespace {
const char kSourceAddressTokenSecret[] = …;
const size_t kNumSessionsToCreatePerSocketEvent = …;
const int kReadBufferSize = …;
}
QuicSimpleServer::QuicSimpleServer(
std::unique_ptr<quic::ProofSource> proof_source,
const quic::QuicConfig& config,
const quic::QuicCryptoServerConfig::ConfigOptions& crypto_config_options,
const quic::ParsedQuicVersionVector& supported_versions,
quic::QuicSimpleServerBackend* quic_simple_server_backend)
: … { … }
void QuicSimpleServer::Initialize() { … }
QuicSimpleServer::~QuicSimpleServer() = default;
bool QuicSimpleServer::CreateUDPSocketAndListen(
const quic::QuicSocketAddress& address) { … }
void QuicSimpleServer::HandleEventsForever() { … }
bool QuicSimpleServer::Listen(const IPEndPoint& address) { … }
void QuicSimpleServer::Shutdown() { … }
void QuicSimpleServer::StartReading() { … }
void QuicSimpleServer::OnReadComplete(int result) { … }
}