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

Unified Diff: webrtc/p2p/quic/quictransportchannel.cc

Issue 1844803002: Modify PeerConnection for end-to-end QuicDataChannel usage (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Remove webrtcsdp.cc from this CL Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/p2p/quic/quictransportchannel.cc
diff --git a/webrtc/p2p/quic/quictransportchannel.cc b/webrtc/p2p/quic/quictransportchannel.cc
index cc0576ddb239a50bea2fbadc8cd541e3a6eb33aa..5ff84ea9e0ab7017ada598f23116643afd8e2995 100644
--- a/webrtc/p2p/quic/quictransportchannel.cc
+++ b/webrtc/p2p/quic/quictransportchannel.cc
@@ -443,6 +443,8 @@ bool QuicTransportChannel::CreateQuicSession() {
this, &QuicTransportChannel::OnHandshakeComplete);
quic_->SignalConnectionClosed.connect(
this, &QuicTransportChannel::OnConnectionClosed);
+ quic_->SignalIncomingStream.connect(this,
+ &QuicTransportChannel::OnIncomingStream);
return true;
}
@@ -523,6 +525,8 @@ bool QuicTransportChannel::IsWriteBlocked() const {
}
void QuicTransportChannel::OnHandshakeComplete() {
+ LOG_J(LS_INFO, this)
+ << "QUIC handshake complete, setting QuicTransportChanel to writable";
set_quic_state(QUIC_TRANSPORT_CONNECTED);
set_writable(true);
// OnReceivingState might have been called before the QUIC channel was
@@ -541,6 +545,7 @@ void QuicTransportChannel::OnConnectionClosed(net::QuicErrorCode error,
// does not close due to failure.
set_quic_state(QUIC_TRANSPORT_CLOSED);
set_writable(false);
+ SignalClosed();
}
void QuicTransportChannel::OnProofValid(
@@ -569,4 +574,16 @@ void QuicTransportChannel::set_quic_state(QuicTransportState state) {
quic_state_ = state;
}
+ReliableQuicStream* QuicTransportChannel::CreateQuicStream() {
+ if (quic_) {
+ net::SpdyPriority priority = 0; // Priority of the QUIC stream (not used)
+ return quic_->CreateOutgoingDynamicStream(priority);
+ }
+ return nullptr;
+}
+
+void QuicTransportChannel::OnIncomingStream(ReliableQuicStream* stream) {
+ SignalIncomingStream(stream);
+}
+
} // namespace cricket

Powered by Google App Engine
This is Rietveld 408576698