| 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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 return packet_generator_; | 673 return packet_generator_; |
| 674 } | 674 } |
| 675 | 675 |
| 676 EncryptionLevel encryption_level() const { return encryption_level_; } | 676 EncryptionLevel encryption_level() const { return encryption_level_; } |
| 677 | 677 |
| 678 const IPEndPoint& last_packet_source_address() const { | 678 const IPEndPoint& last_packet_source_address() const { |
| 679 return last_packet_source_address_; | 679 return last_packet_source_address_; |
| 680 } | 680 } |
| 681 | 681 |
| 682 protected: | 682 protected: |
| 683 // Calls cancel() on all the alarms owned by this connection. |
| 684 void CancelAllAlarms(); |
| 685 |
| 683 // Send a packet to the peer, and takes ownership of the packet if the packet | 686 // Send a packet to the peer, and takes ownership of the packet if the packet |
| 684 // cannot be written immediately. | 687 // cannot be written immediately. |
| 685 virtual void SendOrQueuePacket(SerializedPacket* packet); | 688 virtual void SendOrQueuePacket(SerializedPacket* packet); |
| 686 | 689 |
| 687 // Called after a packet is received from a new peer address on existing | 690 // Called after a packet is received from a new peer address on existing |
| 688 // |path_id| and is decrypted. Starts validation of peer's address change. | 691 // |path_id| and is decrypted. Starts validation of peer's address change. |
| 689 virtual void StartPeerMigration(QuicPathId path_id, | 692 virtual void StartPeerMigration(QuicPathId path_id, |
| 690 PeerAddressChangeType peer_migration_type); | 693 PeerAddressChangeType peer_migration_type); |
| 691 | 694 |
| 692 // Called when a peer address migration is validated on |path_id|. | 695 // Called when a peer address migration is validated on |path_id|. |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1064 | 1067 |
| 1065 // If true, multipath is enabled for this connection. | 1068 // If true, multipath is enabled for this connection. |
| 1066 bool multipath_enabled_; | 1069 bool multipath_enabled_; |
| 1067 | 1070 |
| 1068 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 1071 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
| 1069 }; | 1072 }; |
| 1070 | 1073 |
| 1071 } // namespace net | 1074 } // namespace net |
| 1072 | 1075 |
| 1073 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 1076 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
| OLD | NEW |