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

Side by Side Diff: net/quic/core/quic_stream_sequencer.h

Issue 2387753002: Release read buffer of QuicCryptoStream when incoming message become less frequent. Protected by --… (Closed)
Patch Set: enable quic crypto stream release buffer Created 4 years, 2 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
« no previous file with comments | « net/quic/core/quic_flags_list.h ('k') | net/quic/core/quic_stream_sequencer.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 #ifndef NET_QUIC_QUIC_STREAM_SEQUENCER_H_ 5 #ifndef NET_QUIC_QUIC_STREAM_SEQUENCER_H_
6 #define NET_QUIC_QUIC_STREAM_SEQUENCER_H_ 6 #define NET_QUIC_QUIC_STREAM_SEQUENCER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 void SetBlockedUntilFlush(); 75 void SetBlockedUntilFlush();
76 76
77 // Sets the sequencer to discard all incoming data itself and not call 77 // Sets the sequencer to discard all incoming data itself and not call
78 // |stream_->OnDataAvailable()|. |stream_->OnFinRead()| will be called 78 // |stream_->OnDataAvailable()|. |stream_->OnFinRead()| will be called
79 // automatically when the FIN is consumed (which may be immediately). 79 // automatically when the FIN is consumed (which may be immediately).
80 void StopReading(); 80 void StopReading();
81 81
82 // Free the memory of underlying buffer. 82 // Free the memory of underlying buffer.
83 void ReleaseBuffer(); 83 void ReleaseBuffer();
84 84
85 // Free the memory of underlying buffer when no bytes remain in it.
86 void ReleaseBufferIfEmpty();
87
85 // Number of bytes in the buffer right now. 88 // Number of bytes in the buffer right now.
86 size_t NumBytesBuffered() const; 89 size_t NumBytesBuffered() const;
87 90
88 // Number of bytes has been consumed. 91 // Number of bytes has been consumed.
89 QuicStreamOffset NumBytesConsumed() const; 92 QuicStreamOffset NumBytesConsumed() const;
90 93
91 int num_frames_received() const { return num_frames_received_; } 94 int num_frames_received() const { return num_frames_received_; }
92 95
93 int num_duplicate_frames_received() const { 96 int num_duplicate_frames_received() const {
94 return num_duplicate_frames_received_; 97 return num_duplicate_frames_received_;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 141
139 // If true, all incoming data will be discarded. 142 // If true, all incoming data will be discarded.
140 bool ignore_read_data_; 143 bool ignore_read_data_;
141 144
142 DISALLOW_COPY_AND_ASSIGN(QuicStreamSequencer); 145 DISALLOW_COPY_AND_ASSIGN(QuicStreamSequencer);
143 }; 146 };
144 147
145 } // namespace net 148 } // namespace net
146 149
147 #endif // NET_QUIC_QUIC_STREAM_SEQUENCER_H_ 150 #endif // NET_QUIC_QUIC_STREAM_SEQUENCER_H_
OLDNEW
« no previous file with comments | « net/quic/core/quic_flags_list.h ('k') | net/quic/core/quic_stream_sequencer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698