dschinazi | 1c99fcf | 2019-12-13 11:54:22 -0800 | [diff] [blame] | 1 | // Copyright 2019 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef QUICHE_QUIC_MASQUE_MASQUE_ENCAPSULATED_EPOLL_CLIENT_H_ |
| 6 | #define QUICHE_QUIC_MASQUE_MASQUE_ENCAPSULATED_EPOLL_CLIENT_H_ |
| 7 | |
| 8 | #include "net/third_party/quiche/src/quic/masque/masque_encapsulated_client_session.h" |
| 9 | #include "net/third_party/quiche/src/quic/masque/masque_epoll_client.h" |
| 10 | #include "net/third_party/quiche/src/quic/platform/api/quic_export.h" |
| 11 | #include "net/third_party/quiche/src/quic/tools/quic_client.h" |
| 12 | |
| 13 | namespace quic { |
| 14 | |
| 15 | // QUIC client for QUIC encapsulated in MASQUE. |
| 16 | class QUIC_NO_EXPORT MasqueEncapsulatedEpollClient : public QuicClient { |
| 17 | public: |
| 18 | MasqueEncapsulatedEpollClient(QuicSocketAddress server_address, |
| 19 | const QuicServerId& server_id, |
| 20 | QuicEpollServer* epoll_server, |
| 21 | std::unique_ptr<ProofVerifier> proof_verifier, |
| 22 | MasqueEpollClient* masque_client); |
| 23 | ~MasqueEncapsulatedEpollClient() override; |
| 24 | |
| 25 | // Disallow copy and assign. |
| 26 | MasqueEncapsulatedEpollClient(const MasqueEncapsulatedEpollClient&) = delete; |
| 27 | MasqueEncapsulatedEpollClient& operator=( |
| 28 | const MasqueEncapsulatedEpollClient&) = delete; |
| 29 | |
| 30 | // From QuicClient. |
| 31 | std::unique_ptr<QuicSession> CreateQuicClientSession( |
| 32 | const ParsedQuicVersionVector& supported_versions, |
| 33 | QuicConnection* connection) override; |
| 34 | |
| 35 | QuicConnectionId GetClientConnectionId() override; |
| 36 | |
| 37 | // MASQUE client that this client is encapsulated in. |
| 38 | MasqueEpollClient* masque_client() { return masque_client_; } |
| 39 | |
| 40 | // Client session for this client. |
| 41 | MasqueEncapsulatedClientSession* masque_encapsulated_client_session(); |
| 42 | |
| 43 | private: |
| 44 | MasqueEpollClient* masque_client_; // Unowned. |
| 45 | QuicConnectionId client_connection_id_; |
| 46 | }; |
| 47 | |
| 48 | } // namespace quic |
| 49 | |
| 50 | #endif // QUICHE_QUIC_MASQUE_MASQUE_ENCAPSULATED_EPOLL_CLIENT_H_ |