Index: net/quic/quic_connection.h |
diff --git a/net/quic/quic_connection.h b/net/quic/quic_connection.h |
index 85a8ee4ea3b29b974e9da595d76a866835436ef4..7b4f0a094441affbfa8561b849c93b4048530021 100644 |
--- a/net/quic/quic_connection.h |
+++ b/net/quic/quic_connection.h |
@@ -663,18 +663,16 @@ class NET_EXPORT_PRIVATE QuicConnection |
QuicConnectionHelperInterface* helper() { return helper_; } |
protected: |
- // Do any work which logically would be done in OnPacket but can not be |
- // safely done until the packet is validated. Returns true if the packet |
- // can be handled, false otherwise. Also migrates the connection if the packet |
- // can be handled and peer address changes. |
- virtual bool ProcessValidatedPacket(const QuicPacketHeader& header); |
- |
// Send a packet to the peer, and takes ownership of the packet if the packet |
// cannot be written immediately. |
virtual void SendOrQueuePacket(SerializedPacket* packet); |
- // On peer address changes, determine and return the change type. |
- virtual PeerAddressChangeType DeterminePeerAddressChangeType(); |
+ // On peer address changes, determine and return peer address change type. |
+ PeerAddressChangeType DeterminePeerAddressChangeType(); |
+ |
+ // Migrate the connection if peer address changes. This function should only |
+ // be called after the packet is validated. |
+ virtual void MaybeMigrateConnectionToNewPeerAddress(); |
// Selects and updates the version of the protocol being used by selecting a |
// version from |available_versions| which is also supported. Returns true if |
@@ -821,6 +819,11 @@ class NET_EXPORT_PRIVATE QuicConnection |
// QuicMultipathReceivedPacketManager are landed in QuicConnection. |
void OnPathClosed(QuicPathId path_id); |
+ // Do any work which logically would be done in OnPacket but can not be |
+ // safely done until the packet is validated. Returns true if packet can be |
+ // handled, false otherwise. |
+ bool ProcessValidatedPacket(const QuicPacketHeader& header); |
+ |
QuicFramer framer_; |
QuicConnectionHelperInterface* helper_; // Not owned. |
PerPacketOptions* per_packet_options_; // Not owned. |
@@ -997,6 +1000,12 @@ class NET_EXPORT_PRIVATE QuicConnection |
// We do not support connection migration when the self port changed. |
bool self_port_changed_; |
+ // Destination address of the last received packet. |
+ IPEndPoint last_packet_destination_address_; |
+ |
+ // Source address of the last received packet. |
+ IPEndPoint last_packet_source_address_; |
+ |
// Set to false if the connection should not send truncated connection IDs to |
// the peer, even if the peer supports it. |
bool can_truncate_connection_ids_; |