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

Unified Diff: net/quic/quic_session.cc

Issue 1472563002: Let QUIC streams write 16k before ceding. Behind FLAG_quic_batch_writes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@107581674
Patch Set: Created 5 years, 1 month 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 | « net/quic/quic_flags.cc ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_session.cc
diff --git a/net/quic/quic_session.cc b/net/quic/quic_session.cc
index 0eba20fe96901177675db3c9ff84d4d7f0741430..3505f44e57bc0154346b204de4c4e6d72615f849 100644
--- a/net/quic/quic_session.cc
+++ b/net/quic/quic_session.cc
@@ -263,7 +263,7 @@ void QuicSession::OnCanWrite() {
}
ReliableQuicStream* stream = GetStream(stream_id);
if (stream != nullptr && !stream->flow_controller()->IsBlocked()) {
- // If the stream can't write all bytes, it'll re-add itself to the blocked
+ // If the stream can't write all bytes it'll re-add itself to the blocked
// list.
stream->OnCanWrite();
}
@@ -295,8 +295,11 @@ QuicConsumedData QuicSession::WritevData(
bool fin,
FecProtection fec_protection,
QuicAckListenerInterface* ack_notifier_delegate) {
- return connection_->SendStreamData(id, iov, offset, fin, fec_protection,
- ack_notifier_delegate);
+ QuicConsumedData data =
+ connection_->SendStreamData(id, iov, offset, fin, fec_protection,
+ ack_notifier_delegate);
+ write_blocked_streams_.UpdateBytesForStream(id, data.bytes_consumed);
+ return data;
}
void QuicSession::SendRstStream(QuicStreamId id,
@@ -752,7 +755,7 @@ void QuicSession::MarkConnectionLevelWriteBlocked(QuicStreamId id,
// kHighestPriority.
priority = kHighestPriority;
}
- write_blocked_streams_.PushBack(id, priority);
+ write_blocked_streams_.AddStream(id, priority);
}
bool QuicSession::HasDataToWrite() const {
« no previous file with comments | « net/quic/quic_flags.cc ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698