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 // The entity that handles framing writes for a Quic client or server. | 5 // The entity that handles framing writes for a Quic client or server. |
6 // Each QuicSession will have a connection associated with it. | 6 // Each QuicSession will have a connection associated with it. |
7 // | 7 // |
8 // On the server side, the Dispatcher handles the raw reads, and hands off | 8 // On the server side, the Dispatcher handles the raw reads, and hands off |
9 // packets via ProcessUdpPacket for framing and processing. | 9 // packets via ProcessUdpPacket for framing and processing. |
10 // | 10 // |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 const PacketWriterFactory& writer_factory, | 251 const PacketWriterFactory& writer_factory, |
252 bool owns_writer, | 252 bool owns_writer, |
253 bool is_server, | 253 bool is_server, |
254 bool is_secure, | 254 bool is_secure, |
255 const QuicVersionVector& supported_versions); | 255 const QuicVersionVector& supported_versions); |
256 ~QuicConnection() override; | 256 ~QuicConnection() override; |
257 | 257 |
258 // Sets connection parameters from the supplied |config|. | 258 // Sets connection parameters from the supplied |config|. |
259 void SetFromConfig(const QuicConfig& config); | 259 void SetFromConfig(const QuicConfig& config); |
260 | 260 |
| 261 // Called by the Session when the client has provided CachedNetworkParameters. |
| 262 // Virtual for tests. |
| 263 virtual void ResumeConnectionState( |
| 264 const CachedNetworkParameters& cached_network_params); |
| 265 |
261 // Sets the number of active streams on the connection for congestion control. | 266 // Sets the number of active streams on the connection for congestion control. |
262 void SetNumOpenStreams(size_t num_streams); | 267 void SetNumOpenStreams(size_t num_streams); |
263 | 268 |
264 // Send the data in |data| to the peer in as few packets as possible. | 269 // Send the data in |data| to the peer in as few packets as possible. |
265 // Returns a pair with the number of bytes consumed from data, and a boolean | 270 // Returns a pair with the number of bytes consumed from data, and a boolean |
266 // indicating if the fin bit was consumed. This does not indicate the data | 271 // indicating if the fin bit was consumed. This does not indicate the data |
267 // has been sent on the wire: it may have been turned into a packet and queued | 272 // has been sent on the wire: it may have been turned into a packet and queued |
268 // if the socket was unexpectedly blocked. |fec_protection| indicates if | 273 // if the socket was unexpectedly blocked. |fec_protection| indicates if |
269 // data is to be FEC protected. Note that data that is sent immediately | 274 // data is to be FEC protected. Note that data that is sent immediately |
270 // following MUST_FEC_PROTECT data may get protected by falling within the | 275 // following MUST_FEC_PROTECT data may get protected by falling within the |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 | 837 |
833 // True if this is a secure QUIC connection. | 838 // True if this is a secure QUIC connection. |
834 bool is_secure_; | 839 bool is_secure_; |
835 | 840 |
836 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 841 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
837 }; | 842 }; |
838 | 843 |
839 } // namespace net | 844 } // namespace net |
840 | 845 |
841 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 846 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
OLD | NEW |