| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 virtual void OnPacketRetransmitted( | 130 virtual void OnPacketRetransmitted( |
| 131 QuicPacketSequenceNumber old_sequence_number, | 131 QuicPacketSequenceNumber old_sequence_number, |
| 132 QuicPacketSequenceNumber new_sequence_number) {} | 132 QuicPacketSequenceNumber new_sequence_number) {} |
| 133 | 133 |
| 134 // Called when a packet has been received, but before it is | 134 // Called when a packet has been received, but before it is |
| 135 // validated or parsed. | 135 // validated or parsed. |
| 136 virtual void OnPacketReceived(const IPEndPoint& self_address, | 136 virtual void OnPacketReceived(const IPEndPoint& self_address, |
| 137 const IPEndPoint& peer_address, | 137 const IPEndPoint& peer_address, |
| 138 const QuicEncryptedPacket& packet) {} | 138 const QuicEncryptedPacket& packet) {} |
| 139 | 139 |
| 140 // Called when a packet is recived with a connection id that does not |
| 141 // match the ID of this connection. |
| 142 virtual void OnIncorrectConnectionId( |
| 143 QuicConnectionId connection_id) {} |
| 144 |
| 145 // Called when an undecryptable packet has been received. |
| 146 virtual void OnUndecryptablePacket() {} |
| 147 |
| 148 // Called when a duplicate packet has been received. |
| 149 virtual void OnDuplicatePacket(QuicPacketSequenceNumber sequence_number) {} |
| 150 |
| 140 // Called when the protocol version on the received packet doensn't match | 151 // Called when the protocol version on the received packet doensn't match |
| 141 // current protocol version of the connection. | 152 // current protocol version of the connection. |
| 142 virtual void OnProtocolVersionMismatch(QuicVersion version) {} | 153 virtual void OnProtocolVersionMismatch(QuicVersion version) {} |
| 143 | 154 |
| 144 // Called when the complete header of a packet has been parsed. | 155 // Called when the complete header of a packet has been parsed. |
| 145 virtual void OnPacketHeader(const QuicPacketHeader& header) {} | 156 virtual void OnPacketHeader(const QuicPacketHeader& header) {} |
| 146 | 157 |
| 147 // Called when a StreamFrame has been parsed. | 158 // Called when a StreamFrame has been parsed. |
| 148 virtual void OnStreamFrame(const QuicStreamFrame& frame) {} | 159 virtual void OnStreamFrame(const QuicStreamFrame& frame) {} |
| 149 | 160 |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 // If non-empty this contains the set of versions received in a | 787 // If non-empty this contains the set of versions received in a |
| 777 // version negotiation packet. | 788 // version negotiation packet. |
| 778 QuicVersionVector server_supported_versions_; | 789 QuicVersionVector server_supported_versions_; |
| 779 | 790 |
| 780 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 791 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
| 781 }; | 792 }; |
| 782 | 793 |
| 783 } // namespace net | 794 } // namespace net |
| 784 | 795 |
| 785 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 796 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
| OLD | NEW |