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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 }; | 187 }; |
188 | 188 |
189 // Constructs a new QuicConnection for the specified |guid| and |address|. | 189 // Constructs a new QuicConnection for the specified |guid| and |address|. |
190 // |helper| and |writer| must outlive this connection. | 190 // |helper| and |writer| must outlive this connection. |
191 QuicConnection(QuicGuid guid, | 191 QuicConnection(QuicGuid guid, |
192 IPEndPoint address, | 192 IPEndPoint address, |
193 QuicConnectionHelperInterface* helper, | 193 QuicConnectionHelperInterface* helper, |
194 QuicPacketWriter* writer, | 194 QuicPacketWriter* writer, |
195 bool is_server, | 195 bool is_server, |
196 const QuicVersionVector& supported_versions); | 196 const QuicVersionVector& supported_versions); |
197 virtual ~QuicConnection(); | 197 virtual ~QuicConnection() OVERRIDE; |
198 | 198 |
199 // Sets connection parameters from the supplied |config|. | 199 // Sets connection parameters from the supplied |config|. |
200 void SetFromConfig(const QuicConfig& config); | 200 void SetFromConfig(const QuicConfig& config); |
201 | 201 |
202 // Send the data in |data| to the peer in as few packets as possible. | 202 // Send the data in |data| to the peer in as few packets as possible. |
203 // Returns a pair with the number of bytes consumed from data, and a boolean | 203 // Returns a pair with the number of bytes consumed from data, and a boolean |
204 // indicating if the fin bit was consumed. This does not indicate the data | 204 // indicating if the fin bit was consumed. This does not indicate the data |
205 // has been sent on the wire: it may have been turned into a packet and queued | 205 // has been sent on the wire: it may have been turned into a packet and queued |
206 // if the socket was unexpectedly blocked. | 206 // if the socket was unexpectedly blocked. |
207 // If |delegate| is provided, then it will be informed once ACKs have been | 207 // If |delegate| is provided, then it will be informed once ACKs have been |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 // If non-empty this contains the set of versions received in a | 714 // If non-empty this contains the set of versions received in a |
715 // version negotiation packet. | 715 // version negotiation packet. |
716 QuicVersionVector server_supported_versions_; | 716 QuicVersionVector server_supported_versions_; |
717 | 717 |
718 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 718 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
719 }; | 719 }; |
720 | 720 |
721 } // namespace net | 721 } // namespace net |
722 | 722 |
723 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 723 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
OLD | NEW |