Modify PeerConnection for end-to-end QuicDataChannel usage
To allow end-to-end QuicDataChannel usage with a
PeerConnection, RTCConfiguration has been modified to
include a boolean for whether to do QUIC, since negotiation of
QUIC is not implemented. If one peer does QUIC, then it will be
assumed that the other peer must do QUIC or the connection
will fail.
PeerConnection has been modified to create data channels of type
QuicDataChannel when the peer wants to do QUIC.
WebRtcSession has been modified to use a QuicTransportChannel
instead of a DtlsTransportChannelWrapper/DataChannel
when QUIC should be used.
Modification of previous in-flight CL: https://codereview.chromium.org/1844803002/
Review-Url: https://codereview.webrtc.org/2089553002
Cr-Commit-Position: refs/heads/master@{#13470}
diff --git a/webrtc/api/quicdatatransport.cc b/webrtc/api/quicdatatransport.cc
index 70ad03d..c1caf54 100644
--- a/webrtc/api/quicdatatransport.cc
+++ b/webrtc/api/quicdatatransport.cc
@@ -17,10 +17,14 @@
namespace webrtc {
QuicDataTransport::QuicDataTransport(rtc::Thread* signaling_thread,
- rtc::Thread* worker_thread)
- : signaling_thread_(signaling_thread), worker_thread_(worker_thread) {
+ rtc::Thread* worker_thread,
+ rtc::Thread* network_thread)
+ : signaling_thread_(signaling_thread),
+ worker_thread_(worker_thread),
+ network_thread_(network_thread) {
RTC_DCHECK(signaling_thread_);
RTC_DCHECK(worker_thread_);
+ RTC_DCHECK(network_thread_);
}
QuicDataTransport::~QuicDataTransport() {}
@@ -68,8 +72,8 @@
LOG(LS_ERROR) << "QUIC data channel already exists with id " << config->id;
return nullptr;
}
- rtc::scoped_refptr<QuicDataChannel> data_channel(
- new QuicDataChannel(signaling_thread_, worker_thread_, label, *config));
+ rtc::scoped_refptr<QuicDataChannel> data_channel(new QuicDataChannel(
+ signaling_thread_, worker_thread_, network_thread_, label, *config));
if (quic_transport_channel_) {
if (!data_channel->SetTransportChannel(quic_transport_channel_)) {
LOG(LS_ERROR)