diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-05-17 17:24:03 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-06-22 07:51:41 +0000 |
commit | 774f54339e5db91f785733232d3950366db65d07 (patch) | |
tree | 068e1b47bd1af94d77094ed12b604a6b83d9c22a /chromium/net/third_party/quiche/src/quiche/quic/qbone/qbone_client.h | |
parent | f7eaed5286974984ba5f9e3189d8f49d03e99f81 (diff) | |
download | qtwebengine-chromium-774f54339e5db91f785733232d3950366db65d07.tar.gz |
BASELINE: Update Chromium to 102.0.5005.57
Change-Id: I885f714bb40ee724c28f94ca6bd8dbdb39915158
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/net/third_party/quiche/src/quiche/quic/qbone/qbone_client.h')
-rw-r--r-- | chromium/net/third_party/quiche/src/quiche/quic/qbone/qbone_client.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/chromium/net/third_party/quiche/src/quiche/quic/qbone/qbone_client.h b/chromium/net/third_party/quiche/src/quiche/quic/qbone/qbone_client.h new file mode 100644 index 00000000000..5f52679b326 --- /dev/null +++ b/chromium/net/third_party/quiche/src/quiche/quic/qbone/qbone_client.h @@ -0,0 +1,74 @@ +// Copyright (c) 2019 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef QUICHE_QUIC_QBONE_QBONE_CLIENT_H_ +#define QUICHE_QUIC_QBONE_QBONE_CLIENT_H_ + +#include "absl/strings/string_view.h" +#include "quiche/quic/qbone/qbone_client_interface.h" +#include "quiche/quic/qbone/qbone_client_session.h" +#include "quiche/quic/qbone/qbone_packet_writer.h" +#include "quiche/quic/tools/quic_client_base.h" +#include "quiche/quic/tools/quic_client_epoll_network_helper.h" + +namespace quic { +// A QboneClient encapsulates connecting to a server via an epoll server +// and setting up a QBONE tunnel. See the QboneTestClient in qbone_client_test +// for usage. +class QboneClient : public QuicClientBase, public QboneClientInterface { + public: + // Note that the epoll server, QBONE writer, and handler are owned + // by the caller. + QboneClient(QuicSocketAddress server_address, const QuicServerId& server_id, + const ParsedQuicVersionVector& supported_versions, + QuicSession::Visitor* session_owner, const QuicConfig& config, + QuicEpollServer* epoll_server, + std::unique_ptr<ProofVerifier> proof_verifier, + QbonePacketWriter* qbone_writer, + QboneClientControlStream::Handler* qbone_handler); + ~QboneClient() override; + QboneClientSession* qbone_session(); + + // From QboneClientInterface. Accepts a given packet from the network and + // sends the packet down to the QBONE connection. + void ProcessPacketFromNetwork(absl::string_view packet) override; + + bool EarlyDataAccepted() override; + bool ReceivedInchoateReject() override; + + protected: + int GetNumSentClientHellosFromSession() override; + int GetNumReceivedServerConfigUpdatesFromSession() override; + + // This client does not resend saved data. This will be a no-op. + void ResendSavedData() override; + + // This client does not resend saved data. This will be a no-op. + void ClearDataToResend() override; + + // Takes ownership of |connection|. + std::unique_ptr<QuicSession> CreateQuicClientSession( + const ParsedQuicVersionVector& supported_versions, + QuicConnection* connection) override; + + QbonePacketWriter* qbone_writer() { return qbone_writer_; } + + QboneClientControlStream::Handler* qbone_control_handler() { + return qbone_handler_; + } + + QuicSession::Visitor* session_owner() { return session_owner_; } + + bool HasActiveRequests() override; + + private: + QbonePacketWriter* qbone_writer_; + QboneClientControlStream::Handler* qbone_handler_; + + QuicSession::Visitor* session_owner_; +}; + +} // namespace quic + +#endif // QUICHE_QUIC_QBONE_QBONE_CLIENT_H_ |