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

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

Issue 1856513002: Add QuicTransportChannel methods for QUIC streams (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add back quicsession.h comment 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
« no previous file with comments | « webrtc/p2p/quic/quictransportchannel.h ('k') | webrtc/p2p/quic/quictransportchannel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/quic/quictransportchannel.cc
diff --git a/webrtc/p2p/quic/quictransportchannel.cc b/webrtc/p2p/quic/quictransportchannel.cc
index cc0576ddb239a50bea2fbadc8cd541e3a6eb33aa..446fd4201cc8de964513b4435d7b0b4605c46f7a 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;
}
@@ -541,6 +543,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 +572,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
« no previous file with comments | « webrtc/p2p/quic/quictransportchannel.h ('k') | webrtc/p2p/quic/quictransportchannel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698