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/transport.h" | 18 #include "webrtc/p2p/base/jseptransport.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(mikescarlett): Refactor to avoid code duplication with DtlsTransport. | 26 // TODO(deadbeef): To get QUIC working with TransportController again, would |
| 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. |
27 class QuicTransport : public Transport { | 31 class QuicTransport : public Transport { |
28 public: | 32 public: |
29 QuicTransport(const std::string& name, | 33 QuicTransport(const std::string& name, |
30 PortAllocator* allocator, | 34 PortAllocator* allocator, |
31 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); | 35 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); |
32 | 36 |
33 ~QuicTransport() override; | 37 ~QuicTransport() override; |
34 | 38 |
35 // Transport overrides. | 39 // Transport overrides. |
36 void SetLocalCertificate( | 40 void SetLocalCertificate( |
(...skipping 18 matching lines...) Expand all Loading... |
55 | 59 |
56 private: | 60 private: |
57 rtc::scoped_refptr<rtc::RTCCertificate> local_certificate_; | 61 rtc::scoped_refptr<rtc::RTCCertificate> local_certificate_; |
58 rtc::SSLRole local_role_ = rtc::SSL_CLIENT; | 62 rtc::SSLRole local_role_ = rtc::SSL_CLIENT; |
59 std::unique_ptr<rtc::SSLFingerprint> remote_fingerprint_; | 63 std::unique_ptr<rtc::SSLFingerprint> remote_fingerprint_; |
60 }; | 64 }; |
61 | 65 |
62 } // namespace cricket | 66 } // namespace cricket |
63 | 67 |
64 #endif // WEBRTC_P2P_QUIC_QUICTRANSPORT_H_ | 68 #endif // WEBRTC_P2P_QUIC_QUICTRANSPORT_H_ |
OLD | NEW |