#include "quiche/quic/core/quic_generic_session.h"
#include <cstdint>
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include "absl/strings/string_view.h"
#include "quiche/quic/core/http/web_transport_stream_adapter.h"
#include "quiche/quic/core/quic_crypto_client_stream.h"
#include "quiche/quic/core/quic_session.h"
#include "quiche/quic/core/quic_stream_priority.h"
#include "quiche/quic/core/quic_types.h"
#include "quiche/quic/core/quic_utils.h"
#include "quiche/quic/core/quic_versions.h"
#include "quiche/quic/platform/api/quic_bug_tracker.h"
#include "quiche/quic/platform/api/quic_logging.h"
#include "quiche/common/simple_buffer_allocator.h"
#include "quiche/web_transport/web_transport.h"
namespace quic {
namespace {
class NoOpProofHandler : public QuicCryptoClientStream::ProofHandler { … };
class NoOpServerCryptoHelper : public QuicCryptoServerStreamBase::Helper { … };
}
ParsedQuicVersionVector GetQuicVersionsForGenericSession() { … }
class QUICHE_EXPORT QuicGenericStream : public QuicStream { … };
QuicGenericSessionBase::QuicGenericSessionBase(
QuicConnection* connection, bool owns_connection, Visitor* owner,
const QuicConfig& config, std::string alpn, WebTransportVisitor* visitor,
bool owns_visitor,
std::unique_ptr<QuicDatagramQueue::Observer> datagram_observer)
: … { … }
QuicGenericSessionBase::~QuicGenericSessionBase() { … }
QuicStream* QuicGenericSessionBase::CreateIncomingStream(QuicStreamId id) { … }
void QuicGenericSessionBase::OnTlsHandshakeComplete() { … }
webtransport::Stream*
QuicGenericSessionBase::AcceptIncomingBidirectionalStream() { … }
webtransport::Stream*
QuicGenericSessionBase::AcceptIncomingUnidirectionalStream() { … }
webtransport::Stream*
QuicGenericSessionBase::OpenOutgoingBidirectionalStream() { … }
webtransport::Stream*
QuicGenericSessionBase::OpenOutgoingUnidirectionalStream() { … }
QuicGenericStream* QuicGenericSessionBase::CreateStream(QuicStreamId id) { … }
void QuicGenericSessionBase::OnMessageReceived(absl::string_view message) { … }
void QuicGenericSessionBase::OnCanCreateNewOutgoingStream(bool unidirectional) { … }
webtransport::Stream* QuicGenericSessionBase::GetStreamById(
webtransport::StreamId id) { … }
webtransport::DatagramStatus QuicGenericSessionBase::SendOrQueueDatagram(
absl::string_view datagram) { … }
void QuicGenericSessionBase::OnConnectionClosed(
const QuicConnectionCloseFrame& frame, ConnectionCloseSource source) { … }
QuicGenericClientSession::QuicGenericClientSession(
QuicConnection* connection, bool owns_connection, Visitor* owner,
const QuicConfig& config, std::string host, uint16_t port, std::string alpn,
webtransport::SessionVisitor* visitor, bool owns_visitor,
std::unique_ptr<QuicDatagramQueue::Observer> datagram_observer,
QuicCryptoClientConfig* crypto_config)
: … { … }
QuicGenericClientSession::QuicGenericClientSession(
QuicConnection* connection, bool owns_connection, Visitor* owner,
const QuicConfig& config, std::string host, uint16_t port, std::string alpn,
CreateWebTransportSessionVisitorCallback create_visitor_callback,
std::unique_ptr<QuicDatagramQueue::Observer> datagram_observer,
QuicCryptoClientConfig* crypto_config)
: … { … }
QuicGenericServerSession::QuicGenericServerSession(
QuicConnection* connection, bool owns_connection, Visitor* owner,
const QuicConfig& config, std::string alpn,
webtransport::SessionVisitor* visitor, bool owns_visitor,
std::unique_ptr<QuicDatagramQueue::Observer> datagram_observer,
const QuicCryptoServerConfig* crypto_config,
QuicCompressedCertsCache* compressed_certs_cache)
: … { … }
QuicGenericServerSession::QuicGenericServerSession(
QuicConnection* connection, bool owns_connection, Visitor* owner,
const QuicConfig& config, std::string alpn,
CreateWebTransportSessionVisitorCallback create_visitor_callback,
std::unique_ptr<QuicDatagramQueue::Observer> datagram_observer,
const QuicCryptoServerConfig* crypto_config,
QuicCompressedCertsCache* compressed_certs_cache)
: … { … }
}