OLD | NEW |
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 <stddef.h> | 10 #include <stddef.h> |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 friend class test::QuicSessionPeer; | 328 friend class test::QuicSessionPeer; |
329 | 329 |
330 // Called in OnConfigNegotiated when we receive a new stream level flow | 330 // Called in OnConfigNegotiated when we receive a new stream level flow |
331 // control window in a negotiated config. Closes the connection if invalid. | 331 // control window in a negotiated config. Closes the connection if invalid. |
332 void OnNewStreamFlowControlWindow(QuicStreamOffset new_window); | 332 void OnNewStreamFlowControlWindow(QuicStreamOffset new_window); |
333 | 333 |
334 // Called in OnConfigNegotiated when we receive a new connection level flow | 334 // Called in OnConfigNegotiated when we receive a new connection level flow |
335 // control window in a negotiated config. Closes the connection if invalid. | 335 // control window in a negotiated config. Closes the connection if invalid. |
336 void OnNewSessionFlowControlWindow(QuicStreamOffset new_window); | 336 void OnNewSessionFlowControlWindow(QuicStreamOffset new_window); |
337 | 337 |
338 // Called in OnConfigNegotiated when auto-tuning is enabled for flow | |
339 // control receive windows. | |
340 void EnableAutoTuneReceiveWindow(); | |
341 | |
342 // Called in OnConfigNegotiated for finch trials to measure performance of | |
343 // starting with smaller flow control receive windows and auto-tuning. | |
344 void AdjustInitialFlowControlWindows(size_t stream_window); | |
345 | |
346 // Keep track of highest received byte offset of locally closed streams, while | 338 // Keep track of highest received byte offset of locally closed streams, while |
347 // waiting for a definitive final highest offset from the peer. | 339 // waiting for a definitive final highest offset from the peer. |
348 std::map<QuicStreamId, QuicStreamOffset> | 340 std::map<QuicStreamId, QuicStreamOffset> |
349 locally_closed_streams_highest_offset_; | 341 locally_closed_streams_highest_offset_; |
350 | 342 |
351 scoped_ptr<QuicConnection> connection_; | 343 scoped_ptr<QuicConnection> connection_; |
352 | 344 |
353 std::vector<ReliableQuicStream*> closed_streams_; | 345 std::vector<ReliableQuicStream*> closed_streams_; |
354 | 346 |
355 QuicConfig config_; | 347 QuicConfig config_; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 // The stream id which was last popped in OnCanWrite, or 0, if not under the | 395 // The stream id which was last popped in OnCanWrite, or 0, if not under the |
404 // call stack of OnCanWrite. | 396 // call stack of OnCanWrite. |
405 QuicStreamId currently_writing_stream_id_; | 397 QuicStreamId currently_writing_stream_id_; |
406 | 398 |
407 DISALLOW_COPY_AND_ASSIGN(QuicSession); | 399 DISALLOW_COPY_AND_ASSIGN(QuicSession); |
408 }; | 400 }; |
409 | 401 |
410 } // namespace net | 402 } // namespace net |
411 | 403 |
412 #endif // NET_QUIC_QUIC_SESSION_H_ | 404 #endif // NET_QUIC_QUIC_SESSION_H_ |
OLD | NEW |