summaryrefslogtreecommitdiffstats
path: root/net/quic/quic_sent_packet_manager.h
diff options
context:
space:
mode:
authorrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-18 21:35:24 +0000
committerrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-18 21:35:24 +0000
commita692ad9df989a376b3b4521dcb3a7b9da0e9a76d (patch)
tree03218e8438081a51582c36b7af7fa9df03167244 /net/quic/quic_sent_packet_manager.h
parent3a9ea2845c1de8b523923ab3cb9592d3cbe57fa0 (diff)
downloadchromium_src-a692ad9df989a376b3b4521dcb3a7b9da0e9a76d.zip
chromium_src-a692ad9df989a376b3b4521dcb3a7b9da0e9a76d.tar.gz
chromium_src-a692ad9df989a376b3b4521dcb3a7b9da0e9a76d.tar.bz2
Land Recent QUIC Changes.
Cleanup and adding GetCongestionControlType. Merge internal change: 71125139 https://codereview.chromium.org/400813002/ QUIC test only change to add track the observed loss rate in SendAlgorithmSimulator. Merge internal change: 71116533 https://codereview.chromium.org/399763004/ Minor formatting changes to keep the code similar to internal tree. Merge internal change: 71059110 https://codereview.chromium.org/393283005/ Add more testing to QUIC's BbrTcpSender to verify it shares bandwidth fairly with itself. Also includes fixes to SendAlgorithmSimulator. Merge internal change: 71000950 https://codereview.chromium.org/399793002/ Will merge BbrTcpSender changes in a future CL after the approvals. Add a DLOG that indicates the peer sent us a QUIC_PUBLIC_RESET. Makes it more obvious why the connection ended when running the quic_client. Merge internal change: 70900278 https://codereview.chromium.org/399793002/ QUIC test only change to add a convenience operator for printing SendAlgorithmSimulator stats. Merge internal change: 70897829 https://codereview.chromium.org/399773003/ Adds dynamic setting of FEC group size based on the connection's current congestion window. There will be two triggers for transmitted an FEC packet, when protection is required -- max_packets_per_fec_group, and an FEC alarm that triggers an FEC packet if the FEC group has been open for long enough. This CL implements dynamically setting max_packets_per_fec_group. The FEC alarm will be written in a subsequent CL. Merge internal change: 70821636 https://codereview.chromium.org/398873003/ R=rch@chromium.org Review URL: https://codereview.chromium.org/399153003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284205 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic/quic_sent_packet_manager.h')
-rw-r--r--net/quic/quic_sent_packet_manager.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/net/quic/quic_sent_packet_manager.h b/net/quic/quic_sent_packet_manager.h
index af40072..4ebe151 100644
--- a/net/quic/quic_sent_packet_manager.h
+++ b/net/quic/quic_sent_packet_manager.h
@@ -72,6 +72,18 @@ class NET_EXPORT_PRIVATE QuicSentPacketManager {
QuicPacketSequenceNumber least_unacked_sent_packet) {}
};
+ // Interface which gets callbacks from the QuicSentPacketManager when
+ // network-related state changes. Implementations must not mutate the
+ // state of the packet manager as a result of these callbacks.
+ class NET_EXPORT_PRIVATE NetworkChangeVisitor {
+ public:
+ virtual ~NetworkChangeVisitor() {}
+
+ // Called when congestion window may have changed.
+ virtual void OnCongestionWindowChange(QuicByteCount congestion_window) = 0;
+ // TODO(jri): Add OnRttStatsChange() to this class as well.
+ };
+
// Struct to store the pending retransmission information.
struct PendingRetransmission {
PendingRetransmission(QuicPacketSequenceNumber sequence_number,
@@ -93,7 +105,7 @@ class NET_EXPORT_PRIVATE QuicSentPacketManager {
QuicSentPacketManager(bool is_server,
const QuicClock* clock,
QuicConnectionStats* stats,
- CongestionFeedbackType congestion_type,
+ CongestionControlType congestion_control_type,
LossDetectionType loss_type);
virtual ~QuicSentPacketManager();
@@ -210,6 +222,12 @@ class NET_EXPORT_PRIVATE QuicSentPacketManager {
return largest_observed_;
}
+ void set_network_change_visitor(NetworkChangeVisitor* visitor) {
+ DCHECK(!network_change_visitor_);
+ DCHECK(visitor);
+ network_change_visitor_ = visitor;
+ }
+
private:
friend class test::QuicConnectionPeer;
friend class test::QuicSentPacketManagerPeer;
@@ -316,6 +334,7 @@ class NET_EXPORT_PRIVATE QuicSentPacketManager {
const QuicClock* clock_;
QuicConnectionStats* stats_;
DebugDelegate* debug_delegate_;
+ NetworkChangeVisitor* network_change_visitor_;
RttStats rtt_stats_;
scoped_ptr<SendAlgorithmInterface> send_algorithm_;
scoped_ptr<LossDetectionInterface> loss_algorithm_;