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

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

Issue 351133002: Adds an internal server and chromium's flag for disabling/enabling FEC (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/tools/quic/end_to_end_test.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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 bool write_side_closed() const { return write_side_closed_; } 83 bool write_side_closed() const { return write_side_closed_; }
84 84
85 uint64 stream_bytes_read() const { return stream_bytes_read_; } 85 uint64 stream_bytes_read() const { return stream_bytes_read_; }
86 uint64 stream_bytes_written() const { return stream_bytes_written_; } 86 uint64 stream_bytes_written() const { return stream_bytes_written_; }
87 87
88 QuicVersion version() const; 88 QuicVersion version() const;
89 89
90 void set_fin_sent(bool fin_sent) { fin_sent_ = fin_sent; } 90 void set_fin_sent(bool fin_sent) { fin_sent_ = fin_sent; }
91 void set_rst_sent(bool rst_sent) { rst_sent_ = rst_sent; } 91 void set_rst_sent(bool rst_sent) { rst_sent_ = rst_sent; }
92 92
93 void set_fec_policy(FecPolicy fec_policy) { fec_policy_ = fec_policy; }
94 FecPolicy fec_policy() const { return fec_policy_; }
95
93 // Adjust our flow control windows according to new offset in |frame|. 96 // Adjust our flow control windows according to new offset in |frame|.
94 virtual void OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame); 97 virtual void OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame);
95 98
96 int num_frames_received() const; 99 int num_frames_received() const;
97 100
98 int num_duplicate_frames_received() const; 101 int num_duplicate_frames_received() const;
99 102
100 QuicFlowController* flow_controller() { return &flow_controller_; } 103 QuicFlowController* flow_controller() { return &flow_controller_; }
101 104
102 // Called when we see a frame which could increase the highest offset. 105 // Called when we see a frame which could increase the highest offset.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // Close the read side of the socket. Further frames will not be accepted. 149 // Close the read side of the socket. Further frames will not be accepted.
147 virtual void CloseReadSide(); 150 virtual void CloseReadSide();
148 151
149 // Close the write side of the socket. Further writes will fail. 152 // Close the write side of the socket. Further writes will fail.
150 void CloseWriteSide(); 153 void CloseWriteSide();
151 154
152 bool HasBufferedData() const; 155 bool HasBufferedData() const;
153 156
154 bool fin_buffered() const { return fin_buffered_; } 157 bool fin_buffered() const { return fin_buffered_; }
155 158
156 void set_fec_policy(FecPolicy fec_policy) { fec_policy_ = fec_policy; }
157
158 const QuicSession* session() const { return session_; } 159 const QuicSession* session() const { return session_; }
159 QuicSession* session() { return session_; } 160 QuicSession* session() { return session_; }
160 161
161 const QuicStreamSequencer* sequencer() const { return &sequencer_; } 162 const QuicStreamSequencer* sequencer() const { return &sequencer_; }
162 QuicStreamSequencer* sequencer() { return &sequencer_; } 163 QuicStreamSequencer* sequencer() { return &sequencer_; }
163 164
164 void DisableFlowControl() { 165 void DisableFlowControl() {
165 flow_controller_.Disable(); 166 flow_controller_.Disable();
166 } 167 }
167 168
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 234
234 // The connection level flow controller. Not owned. 235 // The connection level flow controller. Not owned.
235 QuicFlowController* connection_flow_controller_; 236 QuicFlowController* connection_flow_controller_;
236 237
237 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream); 238 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream);
238 }; 239 };
239 240
240 } // namespace net 241 } // namespace net
241 242
242 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_ 243 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_
OLDNEW
« no previous file with comments | « net/quic/quic_session.h ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698