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

Side by Side Diff: net/quic/quic_connection.h

Issue 699433002: QUIC: Only send a new SCUP if enough packets have been sent since the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Fixes_reduction_for_n_connection_78812645
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | net/quic/quic_protocol.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 // The entity that handles framing writes for a Quic client or server. 5 // The entity that handles framing writes for a Quic client or server.
6 // Each QuicSession will have a connection associated with it. 6 // Each QuicSession will have a connection associated with it.
7 // 7 //
8 // On the server side, the Dispatcher handles the raw reads, and hands off 8 // On the server side, the Dispatcher handles the raw reads, and hands off
9 // packets via ProcessUdpPacket for framing and processing. 9 // packets via ProcessUdpPacket for framing and processing.
10 // 10 //
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 // an ACK frame is opportunistically bundled with the first 519 // an ACK frame is opportunistically bundled with the first
520 // outgoing packet. 520 // outgoing packet.
521 ScopedPacketBundler(QuicConnection* connection, AckBundling send_ack); 521 ScopedPacketBundler(QuicConnection* connection, AckBundling send_ack);
522 ~ScopedPacketBundler(); 522 ~ScopedPacketBundler();
523 523
524 private: 524 private:
525 QuicConnection* connection_; 525 QuicConnection* connection_;
526 bool already_in_batch_mode_; 526 bool already_in_batch_mode_;
527 }; 527 };
528 528
529 QuicPacketSequenceNumber sequence_number_of_last_sent_packet() const {
530 return sequence_number_of_last_sent_packet_;
531 }
532
529 protected: 533 protected:
530 // Packets which have not been written to the wire. 534 // Packets which have not been written to the wire.
531 // Owns the QuicPacket* packet. 535 // Owns the QuicPacket* packet.
532 struct QueuedPacket { 536 struct QueuedPacket {
533 QueuedPacket(SerializedPacket packet, 537 QueuedPacket(SerializedPacket packet,
534 EncryptionLevel level); 538 EncryptionLevel level);
535 QueuedPacket(SerializedPacket packet, 539 QueuedPacket(SerializedPacket packet,
536 EncryptionLevel level, 540 EncryptionLevel level,
537 TransmissionType transmission_type, 541 TransmissionType transmission_type,
538 QuicPacketSequenceNumber original_sequence_number); 542 QuicPacketSequenceNumber original_sequence_number);
(...skipping 20 matching lines...) Expand all
559 // Selects and updates the version of the protocol being used by selecting a 563 // Selects and updates the version of the protocol being used by selecting a
560 // version from |available_versions| which is also supported. Returns true if 564 // version from |available_versions| which is also supported. Returns true if
561 // such a version exists, false otherwise. 565 // such a version exists, false otherwise.
562 bool SelectMutualVersion(const QuicVersionVector& available_versions); 566 bool SelectMutualVersion(const QuicVersionVector& available_versions);
563 567
564 QuicPacketWriter* writer() { return writer_; } 568 QuicPacketWriter* writer() { return writer_; }
565 const QuicPacketWriter* writer() const { return writer_; } 569 const QuicPacketWriter* writer() const { return writer_; }
566 570
567 bool peer_port_changed() const { return peer_port_changed_; } 571 bool peer_port_changed() const { return peer_port_changed_; }
568 572
569 QuicPacketSequenceNumber sequence_number_of_last_sent_packet() const {
570 return sequence_number_of_last_sent_packet_;
571 }
572
573 private: 573 private:
574 friend class test::QuicConnectionPeer; 574 friend class test::QuicConnectionPeer;
575 friend class test::PacketSavingConnection; 575 friend class test::PacketSavingConnection;
576 576
577 typedef std::list<QueuedPacket> QueuedPacketList; 577 typedef std::list<QueuedPacket> QueuedPacketList;
578 typedef std::map<QuicFecGroupNumber, QuicFecGroup*> FecGroupMap; 578 typedef std::map<QuicFecGroupNumber, QuicFecGroup*> FecGroupMap;
579 579
580 // Writes the given packet to socket, encrypted with packet's 580 // Writes the given packet to socket, encrypted with packet's
581 // encryption_level. Returns true on successful write, and false if the writer 581 // encryption_level. Returns true on successful write, and false if the writer
582 // was blocked and the write needs to be tried again. Notifies the 582 // was blocked and the write needs to be tried again. Notifies the
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 // If non-empty this contains the set of versions received in a 835 // If non-empty this contains the set of versions received in a
836 // version negotiation packet. 836 // version negotiation packet.
837 QuicVersionVector server_supported_versions_; 837 QuicVersionVector server_supported_versions_;
838 838
839 DISALLOW_COPY_AND_ASSIGN(QuicConnection); 839 DISALLOW_COPY_AND_ASSIGN(QuicConnection);
840 }; 840 };
841 841
842 } // namespace net 842 } // namespace net
843 843
844 #endif // NET_QUIC_QUIC_CONNECTION_H_ 844 #endif // NET_QUIC_QUIC_CONNECTION_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698