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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 virtual void OnPublicResetPacket(const QuicPublicResetPacket& packet) {} | 191 virtual void OnPublicResetPacket(const QuicPublicResetPacket& packet) {} |
192 | 192 |
193 // Called when a version negotiation packet has been received. | 193 // Called when a version negotiation packet has been received. |
194 virtual void OnVersionNegotiationPacket( | 194 virtual void OnVersionNegotiationPacket( |
195 const QuicVersionNegotiationPacket& packet) {} | 195 const QuicVersionNegotiationPacket& packet) {} |
196 | 196 |
197 // Called after a packet has been successfully parsed which results | 197 // Called after a packet has been successfully parsed which results |
198 // in the revival of a packet via FEC. | 198 // in the revival of a packet via FEC. |
199 virtual void OnRevivedPacket(const QuicPacketHeader& revived_header, | 199 virtual void OnRevivedPacket(const QuicPacketHeader& revived_header, |
200 base::StringPiece payload) {} | 200 base::StringPiece payload) {} |
| 201 |
| 202 // Called when the connection is closed. |
| 203 virtual void OnConnectionClosed(QuicErrorCode error, bool from_peer) {} |
201 }; | 204 }; |
202 | 205 |
203 class NET_EXPORT_PRIVATE QuicConnectionHelperInterface { | 206 class NET_EXPORT_PRIVATE QuicConnectionHelperInterface { |
204 public: | 207 public: |
205 virtual ~QuicConnectionHelperInterface() {} | 208 virtual ~QuicConnectionHelperInterface() {} |
206 | 209 |
207 // Returns a QuicClock to be used for all time related functions. | 210 // Returns a QuicClock to be used for all time related functions. |
208 virtual const QuicClock* GetClock() const = 0; | 211 virtual const QuicClock* GetClock() const = 0; |
209 | 212 |
210 // Returns a QuicRandom to be used for all random number related functions. | 213 // Returns a QuicRandom to be used for all random number related functions. |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 // If non-empty this contains the set of versions received in a | 790 // If non-empty this contains the set of versions received in a |
788 // version negotiation packet. | 791 // version negotiation packet. |
789 QuicVersionVector server_supported_versions_; | 792 QuicVersionVector server_supported_versions_; |
790 | 793 |
791 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 794 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
792 }; | 795 }; |
793 | 796 |
794 } // namespace net | 797 } // namespace net |
795 | 798 |
796 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 799 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
OLD | NEW |