Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: webrtc/api/quicdatatransport.h

Issue 2146133002: Revert of Modify PeerConnection for end-to-end QuicDataChannel usage (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/api/quicdatachannel_unittest.cc ('k') | webrtc/api/quicdatatransport.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 18 matching lines...) Expand all
29 29
30 // QuicDataTransport creates QuicDataChannels for the PeerConnection. It also 30 // QuicDataTransport creates QuicDataChannels for the PeerConnection. It also
31 // handles QUIC stream demuxing by distributing incoming QUIC streams from the 31 // handles QUIC stream demuxing by distributing incoming QUIC streams from the
32 // QuicTransportChannel among the QuicDataChannels that it has created. 32 // QuicTransportChannel among the QuicDataChannels that it has created.
33 // 33 //
34 // QuicDataTransport reads the data channel ID from the incoming QUIC stream, 34 // QuicDataTransport reads the data channel ID from the incoming QUIC stream,
35 // then looks it up in a map of ID => QuicDataChannel. If the data channel 35 // then looks it up in a map of ID => QuicDataChannel. If the data channel
36 // exists, it sends the QUIC stream to the QuicDataChannel. 36 // exists, it sends the QUIC stream to the QuicDataChannel.
37 class QuicDataTransport : public sigslot::has_slots<> { 37 class QuicDataTransport : public sigslot::has_slots<> {
38 public: 38 public:
39 QuicDataTransport(rtc::Thread* signaling_thread, 39 QuicDataTransport(rtc::Thread* signaling_thread, rtc::Thread* worker_thread);
40 rtc::Thread* worker_thread,
41 rtc::Thread* network_thread);
42 ~QuicDataTransport() override; 40 ~QuicDataTransport() override;
43 41
44 // Sets the QUIC transport channel for the QuicDataChannels and the 42 // Sets the QUIC transport channel for the QuicDataChannels and the
45 // QuicDataTransport. Returns false if a different QUIC transport channel is 43 // QuicDataTransport. Returns false if a different QUIC transport channel is
46 // already set, the QUIC transport channel cannot be set for any of the 44 // already set, the QUIC transport channel cannot be set for any of the
47 // QuicDataChannels, or |channel| is NULL. 45 // QuicDataChannels, or |channel| is NULL.
48 bool SetTransportChannel(cricket::QuicTransportChannel* channel); 46 bool SetTransportChannel(cricket::QuicTransportChannel* channel);
49 47
50 // Creates a QuicDataChannel that uses this QuicDataTransport. 48 // Creates a QuicDataChannel that uses this QuicDataTransport.
51 rtc::scoped_refptr<DataChannelInterface> CreateDataChannel( 49 rtc::scoped_refptr<DataChannelInterface> CreateDataChannel(
(...skipping 23 matching lines...) Expand all
75 size_t len); 73 size_t len);
76 74
77 // Map of data channel ID => QUIC data channel values. 75 // Map of data channel ID => QUIC data channel values.
78 std::unordered_map<int, rtc::scoped_refptr<QuicDataChannel>> 76 std::unordered_map<int, rtc::scoped_refptr<QuicDataChannel>>
79 data_channel_by_id_; 77 data_channel_by_id_;
80 // Map of QUIC stream ID => ReliableQuicStream* values. 78 // Map of QUIC stream ID => ReliableQuicStream* values.
81 std::unordered_map<net::QuicStreamId, cricket::ReliableQuicStream*> 79 std::unordered_map<net::QuicStreamId, cricket::ReliableQuicStream*>
82 quic_stream_by_id_; 80 quic_stream_by_id_;
83 // QuicTransportChannel for sending/receiving data. 81 // QuicTransportChannel for sending/receiving data.
84 cricket::QuicTransportChannel* quic_transport_channel_ = nullptr; 82 cricket::QuicTransportChannel* quic_transport_channel_ = nullptr;
85 // Threads for the QUIC data channel. 83 // Signaling and worker threads for the QUIC data channel.
86 rtc::Thread* const signaling_thread_; 84 rtc::Thread* const signaling_thread_;
87 rtc::Thread* const worker_thread_; 85 rtc::Thread* const worker_thread_;
88 rtc::Thread* const network_thread_;
89 }; 86 };
90 87
91 } // namespace webrtc 88 } // namespace webrtc
92 89
93 #endif // WEBRTC_API_QUICDATATRANSPORT_H_ 90 #endif // WEBRTC_API_QUICDATATRANSPORT_H_
OLDNEW
« no previous file with comments | « webrtc/api/quicdatachannel_unittest.cc ('k') | webrtc/api/quicdatatransport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698