| 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 const QuicVersionVector& supported_versions); | 223 const QuicVersionVector& supported_versions); |
| 224 virtual ~QuicConnection(); | 224 virtual ~QuicConnection(); |
| 225 | 225 |
| 226 // Sets connection parameters from the supplied |config|. | 226 // Sets connection parameters from the supplied |config|. |
| 227 void SetFromConfig(const QuicConfig& config); | 227 void SetFromConfig(const QuicConfig& config); |
| 228 | 228 |
| 229 // Send the data in |data| to the peer in as few packets as possible. | 229 // Send the data in |data| to the peer in as few packets as possible. |
| 230 // Returns a pair with the number of bytes consumed from data, and a boolean | 230 // Returns a pair with the number of bytes consumed from data, and a boolean |
| 231 // indicating if the fin bit was consumed. This does not indicate the data | 231 // indicating if the fin bit was consumed. This does not indicate the data |
| 232 // has been sent on the wire: it may have been turned into a packet and queued | 232 // has been sent on the wire: it may have been turned into a packet and queued |
| 233 // if the socket was unexpectedly blocked. | 233 // if the socket was unexpectedly blocked. |fec_protection| indicates if |
| 234 // data is to be FEC protected. Note that data that is sent immediately |
| 235 // following MUST_FEC_PROTECT data may get protected by falling within the |
| 236 // same FEC group. |
| 234 // If |delegate| is provided, then it will be informed once ACKs have been | 237 // If |delegate| is provided, then it will be informed once ACKs have been |
| 235 // received for all the packets written in this call. | 238 // received for all the packets written in this call. |
| 236 // The |delegate| is not owned by the QuicConnection and must outlive it. | 239 // The |delegate| is not owned by the QuicConnection and must outlive it. |
| 237 QuicConsumedData SendStreamData(QuicStreamId id, | 240 QuicConsumedData SendStreamData(QuicStreamId id, |
| 238 const IOVector& data, | 241 const IOVector& data, |
| 239 QuicStreamOffset offset, | 242 QuicStreamOffset offset, |
| 240 bool fin, | 243 bool fin, |
| 244 FecProtection fec_protection, |
| 241 QuicAckNotifier::DelegateInterface* delegate); | 245 QuicAckNotifier::DelegateInterface* delegate); |
| 242 | 246 |
| 243 // Send a RST_STREAM frame to the peer. | 247 // Send a RST_STREAM frame to the peer. |
| 244 virtual void SendRstStream(QuicStreamId id, | 248 virtual void SendRstStream(QuicStreamId id, |
| 245 QuicRstStreamErrorCode error, | 249 QuicRstStreamErrorCode error, |
| 246 QuicStreamOffset bytes_written); | 250 QuicStreamOffset bytes_written); |
| 247 | 251 |
| 248 // Send a BLOCKED frame to the peer. | 252 // Send a BLOCKED frame to the peer. |
| 249 virtual void SendBlocked(QuicStreamId id); | 253 virtual void SendBlocked(QuicStreamId id); |
| 250 | 254 |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 // If non-empty this contains the set of versions received in a | 763 // If non-empty this contains the set of versions received in a |
| 760 // version negotiation packet. | 764 // version negotiation packet. |
| 761 QuicVersionVector server_supported_versions_; | 765 QuicVersionVector server_supported_versions_; |
| 762 | 766 |
| 763 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 767 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
| 764 }; | 768 }; |
| 765 | 769 |
| 766 } // namespace net | 770 } // namespace net |
| 767 | 771 |
| 768 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 772 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
| OLD | NEW |