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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 QuicConnectionHelperInterface* helper, | 250 QuicConnectionHelperInterface* helper, |
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 const QuicVersionVector& supported_versions); | 254 const QuicVersionVector& supported_versions); |
255 ~QuicConnection() override; | 255 ~QuicConnection() override; |
256 | 256 |
257 // Sets connection parameters from the supplied |config|. | 257 // Sets connection parameters from the supplied |config|. |
258 void SetFromConfig(const QuicConfig& config); | 258 void SetFromConfig(const QuicConfig& config); |
259 | 259 |
| 260 // Sets the number of active streams on the connection for congestion control. |
| 261 void SetNumOpenStreams(size_t num_streams); |
| 262 |
260 // Send the data in |data| to the peer in as few packets as possible. | 263 // Send the data in |data| to the peer in as few packets as possible. |
261 // Returns a pair with the number of bytes consumed from data, and a boolean | 264 // Returns a pair with the number of bytes consumed from data, and a boolean |
262 // indicating if the fin bit was consumed. This does not indicate the data | 265 // indicating if the fin bit was consumed. This does not indicate the data |
263 // has been sent on the wire: it may have been turned into a packet and queued | 266 // has been sent on the wire: it may have been turned into a packet and queued |
264 // if the socket was unexpectedly blocked. |fec_protection| indicates if | 267 // if the socket was unexpectedly blocked. |fec_protection| indicates if |
265 // data is to be FEC protected. Note that data that is sent immediately | 268 // data is to be FEC protected. Note that data that is sent immediately |
266 // following MUST_FEC_PROTECT data may get protected by falling within the | 269 // following MUST_FEC_PROTECT data may get protected by falling within the |
267 // same FEC group. | 270 // same FEC group. |
268 // If |delegate| is provided, then it will be informed once ACKs have been | 271 // If |delegate| is provided, then it will be informed once ACKs have been |
269 // received for all the packets written in this call. | 272 // received for all the packets written in this call. |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 // If non-empty this contains the set of versions received in a | 838 // If non-empty this contains the set of versions received in a |
836 // version negotiation packet. | 839 // version negotiation packet. |
837 QuicVersionVector server_supported_versions_; | 840 QuicVersionVector server_supported_versions_; |
838 | 841 |
839 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 842 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
840 }; | 843 }; |
841 | 844 |
842 } // namespace net | 845 } // namespace net |
843 | 846 |
844 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 847 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
OLD | NEW |