| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 virtual void OnVersionNegotiationPacket( | 197 virtual void OnVersionNegotiationPacket( |
| 198 const QuicVersionNegotiationPacket& packet) {} | 198 const QuicVersionNegotiationPacket& packet) {} |
| 199 | 199 |
| 200 // Called after a packet has been successfully parsed which results | 200 // Called after a packet has been successfully parsed which results |
| 201 // in the revival of a packet via FEC. | 201 // in the revival of a packet via FEC. |
| 202 virtual void OnRevivedPacket(const QuicPacketHeader& revived_header, | 202 virtual void OnRevivedPacket(const QuicPacketHeader& revived_header, |
| 203 base::StringPiece payload) {} | 203 base::StringPiece payload) {} |
| 204 | 204 |
| 205 // Called when the connection is closed. | 205 // Called when the connection is closed. |
| 206 virtual void OnConnectionClosed(QuicErrorCode error, bool from_peer) {} | 206 virtual void OnConnectionClosed(QuicErrorCode error, bool from_peer) {} |
| 207 |
| 208 // Called when the version negotiation is successful. |
| 209 virtual void OnSuccessfulVersionNegotiation(const QuicVersion& version) {} |
| 207 }; | 210 }; |
| 208 | 211 |
| 209 class NET_EXPORT_PRIVATE QuicConnectionHelperInterface { | 212 class NET_EXPORT_PRIVATE QuicConnectionHelperInterface { |
| 210 public: | 213 public: |
| 211 virtual ~QuicConnectionHelperInterface() {} | 214 virtual ~QuicConnectionHelperInterface() {} |
| 212 | 215 |
| 213 // Returns a QuicClock to be used for all time related functions. | 216 // Returns a QuicClock to be used for all time related functions. |
| 214 virtual const QuicClock* GetClock() const = 0; | 217 virtual const QuicClock* GetClock() const = 0; |
| 215 | 218 |
| 216 // Returns a QuicRandom to be used for all random number related functions. | 219 // Returns a QuicRandom to be used for all random number related functions. |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 // If non-empty this contains the set of versions received in a | 810 // If non-empty this contains the set of versions received in a |
| 808 // version negotiation packet. | 811 // version negotiation packet. |
| 809 QuicVersionVector server_supported_versions_; | 812 QuicVersionVector server_supported_versions_; |
| 810 | 813 |
| 811 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 814 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
| 812 }; | 815 }; |
| 813 | 816 |
| 814 } // namespace net | 817 } // namespace net |
| 815 | 818 |
| 816 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 819 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
| OLD | NEW |