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

Side by Side Diff: net/quic/quic_session.cc

Issue 243533003: Sent QUIC "PING" frames when a stream is open and the connection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_session.h ('k') | net/quic/test_tools/quic_connection_peer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_session.h" 5 #include "net/quic/quic_session.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "net/quic/crypto/proof_verifier.h" 8 #include "net/quic/crypto/proof_verifier.h"
9 #include "net/quic/quic_connection.h" 9 #include "net/quic/quic_connection.h"
10 #include "net/quic/quic_headers_stream.h" 10 #include "net/quic/quic_headers_stream.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 79 }
80 80
81 virtual bool HasPendingWrites() const OVERRIDE { 81 virtual bool HasPendingWrites() const OVERRIDE {
82 return session_->HasPendingWrites(); 82 return session_->HasPendingWrites();
83 } 83 }
84 84
85 virtual bool HasPendingHandshake() const OVERRIDE { 85 virtual bool HasPendingHandshake() const OVERRIDE {
86 return session_->HasPendingHandshake(); 86 return session_->HasPendingHandshake();
87 } 87 }
88 88
89 virtual bool HasOpenDataStreams() const OVERRIDE {
90 return session_->HasOpenDataStreams();
91 }
92
89 private: 93 private:
90 QuicSession* session_; 94 QuicSession* session_;
91 }; 95 };
92 96
93 QuicSession::QuicSession(QuicConnection* connection, 97 QuicSession::QuicSession(QuicConnection* connection,
94 const QuicConfig& config) 98 const QuicConfig& config)
95 : connection_(connection), 99 : connection_(connection),
96 visitor_shim_(new VisitorShim(this)), 100 visitor_shim_(new VisitorShim(this)),
97 config_(config), 101 config_(config),
98 max_open_streams_(config_.max_streams_per_connection()), 102 max_open_streams_(config_.max_streams_per_connection()),
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 298 }
295 299
296 bool QuicSession::HasPendingWrites() const { 300 bool QuicSession::HasPendingWrites() const {
297 return write_blocked_streams_.HasWriteBlockedStreams(); 301 return write_blocked_streams_.HasWriteBlockedStreams();
298 } 302 }
299 303
300 bool QuicSession::HasPendingHandshake() const { 304 bool QuicSession::HasPendingHandshake() const {
301 return has_pending_handshake_; 305 return has_pending_handshake_;
302 } 306 }
303 307
308 bool QuicSession::HasOpenDataStreams() const {
309 return GetNumOpenStreams() > 0;
310 }
311
304 QuicConsumedData QuicSession::WritevData( 312 QuicConsumedData QuicSession::WritevData(
305 QuicStreamId id, 313 QuicStreamId id,
306 const IOVector& data, 314 const IOVector& data,
307 QuicStreamOffset offset, 315 QuicStreamOffset offset,
308 bool fin, 316 bool fin,
309 QuicAckNotifier::DelegateInterface* ack_notifier_delegate) { 317 QuicAckNotifier::DelegateInterface* ack_notifier_delegate) {
310 return connection_->SendStreamData(id, data, offset, fin, 318 return connection_->SendStreamData(id, data, offset, fin,
311 ack_notifier_delegate); 319 ack_notifier_delegate);
312 } 320 }
313 321
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 NOTIMPLEMENTED(); 599 NOTIMPLEMENTED();
592 return false; 600 return false;
593 } 601 }
594 602
595 void QuicSession::PostProcessAfterData() { 603 void QuicSession::PostProcessAfterData() {
596 STLDeleteElements(&closed_streams_); 604 STLDeleteElements(&closed_streams_);
597 closed_streams_.clear(); 605 closed_streams_.clear();
598 } 606 }
599 607
600 } // namespace net 608 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_session.h ('k') | net/quic/test_tools/quic_connection_peer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698