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

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

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « net/quic/quic_utils.cc ('k') | net/quic/reliable_quic_stream.cc » ('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 base class for client/server reliable streams. 5 // The base class for client/server reliable streams.
6 6
7 #ifndef NET_QUIC_RELIABLE_QUIC_STREAM_H_ 7 #ifndef NET_QUIC_RELIABLE_QUIC_STREAM_H_
8 #define NET_QUIC_RELIABLE_QUIC_STREAM_H_ 8 #define NET_QUIC_RELIABLE_QUIC_STREAM_H_
9 9
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 virtual void OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame); 96 virtual void OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame);
97 97
98 int num_frames_received() const; 98 int num_frames_received() const;
99 99
100 int num_duplicate_frames_received() const; 100 int num_duplicate_frames_received() const;
101 101
102 QuicFlowController* flow_controller() { return &flow_controller_; } 102 QuicFlowController* flow_controller() { return &flow_controller_; }
103 103
104 // Called when we see a frame which could increase the highest offset. 104 // Called when we see a frame which could increase the highest offset.
105 // Returns true if the highest offset did increase. 105 // Returns true if the highest offset did increase.
106 bool MaybeIncreaseHighestReceivedOffset(uint64 new_offset); 106 bool MaybeIncreaseHighestReceivedOffset(QuicStreamOffset new_offset);
107 // Called when bytese are sent to the peer. 107 // Called when bytese are sent to the peer.
108 void AddBytesSent(uint64 bytes); 108 void AddBytesSent(QuicByteCount bytes);
109 // Called by the stream sequencer as bytes are consumed from the buffer. 109 // Called by the stream sequencer as bytes are consumed from the buffer.
110 // If our receive window has dropped below the threshold, then send a 110 // If our receive window has dropped below the threshold, then send a
111 // WINDOW_UPDATE frame. 111 // WINDOW_UPDATE frame.
112 void AddBytesConsumed(uint64 bytes); 112 void AddBytesConsumed(QuicByteCount bytes);
113 113
114 // Updates the flow controller's send window offset and calls OnCanWrite if 114 // Updates the flow controller's send window offset and calls OnCanWrite if
115 // it was blocked before. 115 // it was blocked before.
116 void UpdateSendWindowOffset(uint64 new_offset); 116 void UpdateSendWindowOffset(QuicStreamOffset new_offset);
117 117
118 // Returns true if the stream is flow control blocked, by the stream flow 118 // Returns true if the stream is flow control blocked, by the stream flow
119 // control window or the connection flow control window. 119 // control window or the connection flow control window.
120 bool IsFlowControlBlocked(); 120 bool IsFlowControlBlocked();
121 121
122 // Returns true if we have received either a RST or a FIN - either of which 122 // Returns true if we have received either a RST or a FIN - either of which
123 // gives a definitive number of bytes which the peer has sent. If this is not 123 // gives a definitive number of bytes which the peer has sent. If this is not
124 // true on stream termination the session must keep track of the stream's byte 124 // true on stream termination the session must keep track of the stream's byte
125 // offset until a definitive final value arrives. 125 // offset until a definitive final value arrives.
126 bool HasFinalReceivedByteOffset() const { 126 bool HasFinalReceivedByteOffset() const {
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 // connection level flow control limits (but are stream level flow control 248 // connection level flow control limits (but are stream level flow control
249 // limited). 249 // limited).
250 bool stream_contributes_to_connection_flow_control_; 250 bool stream_contributes_to_connection_flow_control_;
251 251
252 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream); 252 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream);
253 }; 253 };
254 254
255 } // namespace net 255 } // namespace net
256 256
257 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_ 257 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_
OLDNEW
« no previous file with comments | « net/quic/quic_utils.cc ('k') | net/quic/reliable_quic_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698