OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_P2P_QUIC_QUICTRANSPORT_H_ | 11 #ifndef WEBRTC_P2P_QUIC_QUICTRANSPORT_H_ |
12 #define WEBRTC_P2P_QUIC_QUICTRANSPORT_H_ | 12 #define WEBRTC_P2P_QUIC_QUICTRANSPORT_H_ |
13 | 13 |
14 #include <string> | 14 #include <string> |
15 #include <map> | 15 #include <map> |
16 #include <memory> | 16 #include <memory> |
17 | 17 |
18 #include "webrtc/p2p/base/jseptransport.h" | 18 #include "webrtc/p2p/base/transport.h" |
19 #include "webrtc/p2p/quic/quictransportchannel.h" | 19 #include "webrtc/p2p/quic/quictransportchannel.h" |
20 | 20 |
21 namespace cricket { | 21 namespace cricket { |
22 | 22 |
23 class P2PTransportChannel; | 23 class P2PTransportChannel; |
24 class PortAllocator; | 24 class PortAllocator; |
25 | 25 |
26 // TODO(deadbeef): To get QUIC working with TransportController again, would | 26 // TODO(mikescarlett): Refactor to avoid code duplication with DtlsTransport. |
27 // need to merge this class with Transport (or make separate DTLS/QUIC | |
28 // subclasses). The only difference between the two (as of typing this) is that | |
29 // the QUIC channel *requires* a fingerprint, whereas the DTLS channel can | |
30 // operate in a passthrough mode when SDES is used. | |
31 class QuicTransport : public Transport { | 27 class QuicTransport : public Transport { |
32 public: | 28 public: |
33 QuicTransport(const std::string& name, | 29 QuicTransport(const std::string& name, |
34 PortAllocator* allocator, | 30 PortAllocator* allocator, |
35 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); | 31 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); |
36 | 32 |
37 ~QuicTransport() override; | 33 ~QuicTransport() override; |
38 | 34 |
39 // Transport overrides. | 35 // Transport overrides. |
40 void SetLocalCertificate( | 36 void SetLocalCertificate( |
(...skipping 18 matching lines...) Expand all Loading... |
59 | 55 |
60 private: | 56 private: |
61 rtc::scoped_refptr<rtc::RTCCertificate> local_certificate_; | 57 rtc::scoped_refptr<rtc::RTCCertificate> local_certificate_; |
62 rtc::SSLRole local_role_ = rtc::SSL_CLIENT; | 58 rtc::SSLRole local_role_ = rtc::SSL_CLIENT; |
63 std::unique_ptr<rtc::SSLFingerprint> remote_fingerprint_; | 59 std::unique_ptr<rtc::SSLFingerprint> remote_fingerprint_; |
64 }; | 60 }; |
65 | 61 |
66 } // namespace cricket | 62 } // namespace cricket |
67 | 63 |
68 #endif // WEBRTC_P2P_QUIC_QUICTRANSPORT_H_ | 64 #endif // WEBRTC_P2P_QUIC_QUICTRANSPORT_H_ |
OLD | NEW |