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

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

Issue 557363003: Allow number of open QUIC streams to grow 10% beyond configured limit at (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@change_initial_RTT_estimate_75389539
Patch Set: Created 6 years, 3 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/quic_server_session.cc ('k') | net/quic/quic_session.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 // A QuicSession, which demuxes a single connection to individual streams. 5 // A QuicSession, which demuxes a single connection to individual streams.
6 6
7 #ifndef NET_QUIC_QUIC_SESSION_H_ 7 #ifndef NET_QUIC_QUIC_SESSION_H_
8 #define NET_QUIC_QUIC_SESSION_H_ 8 #define NET_QUIC_QUIC_SESSION_H_
9 9
10 #include <vector> 10 #include <vector>
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 // Gets the SSL connection information. 200 // Gets the SSL connection information.
201 virtual bool GetSSLInfo(SSLInfo* ssl_info) const; 201 virtual bool GetSSLInfo(SSLInfo* ssl_info) const;
202 202
203 QuicErrorCode error() const { return error_; } 203 QuicErrorCode error() const { return error_; }
204 204
205 bool is_server() const { return connection_->is_server(); } 205 bool is_server() const { return connection_->is_server(); }
206 206
207 QuicFlowController* flow_controller() { return flow_controller_.get(); } 207 QuicFlowController* flow_controller() { return flow_controller_.get(); }
208 208
209 size_t get_max_open_streams() const { return max_open_streams_; }
210
209 protected: 211 protected:
210 typedef base::hash_map<QuicStreamId, QuicDataStream*> DataStreamMap; 212 typedef base::hash_map<QuicStreamId, QuicDataStream*> DataStreamMap;
211 213
212 // Creates a new stream, owned by the caller, to handle a peer-initiated 214 // Creates a new stream, owned by the caller, to handle a peer-initiated
213 // stream. Returns NULL and does error handling if the stream can not be 215 // stream. Returns NULL and does error handling if the stream can not be
214 // created. 216 // created.
215 virtual QuicDataStream* CreateIncomingDataStream(QuicStreamId id) = 0; 217 virtual QuicDataStream* CreateIncomingDataStream(QuicStreamId id) = 0;
216 218
217 // Create a new stream, owned by the caller, to handle a locally-initiated 219 // Create a new stream, owned by the caller, to handle a locally-initiated
218 // stream. Returns NULL if max streams have already been opened. 220 // stream. Returns NULL if max streams have already been opened.
(...skipping 23 matching lines...) Expand all
242 base::hash_map<QuicStreamId, QuicDataStream*>* streams() { 244 base::hash_map<QuicStreamId, QuicDataStream*>* streams() {
243 return &stream_map_; 245 return &stream_map_;
244 } 246 }
245 247
246 const base::hash_map<QuicStreamId, QuicDataStream*>* streams() const { 248 const base::hash_map<QuicStreamId, QuicDataStream*>* streams() const {
247 return &stream_map_; 249 return &stream_map_;
248 } 250 }
249 251
250 std::vector<QuicDataStream*>* closed_streams() { return &closed_streams_; } 252 std::vector<QuicDataStream*>* closed_streams() { return &closed_streams_; }
251 253
252 size_t get_max_open_streams() const { 254 void set_max_open_streams(size_t max_open_streams);
253 return max_open_streams_;
254 }
255 255
256 scoped_ptr<QuicHeadersStream> headers_stream_; 256 scoped_ptr<QuicHeadersStream> headers_stream_;
257 257
258 private: 258 private:
259 friend class test::QuicSessionPeer; 259 friend class test::QuicSessionPeer;
260 friend class VisitorShim; 260 friend class VisitorShim;
261 261
262 // Performs the work required to close |stream_id|. If |locally_reset| 262 // Performs the work required to close |stream_id|. If |locally_reset|
263 // then the stream has been reset by this endpoint, not by the peer. 263 // then the stream has been reset by this endpoint, not by the peer.
264 void CloseStreamInner(QuicStreamId stream_id, bool locally_reset); 264 void CloseStreamInner(QuicStreamId stream_id, bool locally_reset);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 322
323 // Used for session level flow control. 323 // Used for session level flow control.
324 scoped_ptr<QuicFlowController> flow_controller_; 324 scoped_ptr<QuicFlowController> flow_controller_;
325 325
326 DISALLOW_COPY_AND_ASSIGN(QuicSession); 326 DISALLOW_COPY_AND_ASSIGN(QuicSession);
327 }; 327 };
328 328
329 } // namespace net 329 } // namespace net
330 330
331 #endif // NET_QUIC_QUIC_SESSION_H_ 331 #endif // NET_QUIC_QUIC_SESSION_H_
OLDNEW
« no previous file with comments | « net/quic/quic_server_session.cc ('k') | net/quic/quic_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698