(n/a, not in use) add interfaces to set up peer address in QuicPacketCreator which the serialized packets are sent to through out the current call stack. No protected.
PiperOrigin-RevId: 328189072
Change-Id: I3c6d25aeb0f685891652519d62b92b1c0436d688
diff --git a/quic/core/quic_packet_creator.h b/quic/core/quic_packet_creator.h
index a225793..0fe3621 100644
--- a/quic/core/quic_packet_creator.h
+++ b/quic/core/quic_packet_creator.h
@@ -82,6 +82,20 @@
virtual void OnStreamFrameCoalesced(const QuicStreamFrame& /*frame*/) {}
};
+ // Set the peer address which the serialized packet will be sent to during the
+ // scope of this object. Upon exiting the scope, the original peer address is
+ // restored.
+ class QUIC_EXPORT_PRIVATE ScopedPeerAddressContext {
+ public:
+ ScopedPeerAddressContext(QuicPacketCreator* creator,
+ QuicSocketAddress address);
+ ~ScopedPeerAddressContext();
+
+ private:
+ QuicPacketCreator* creator_;
+ QuicSocketAddress old_peer_address_;
+ };
+
QuicPacketCreator(QuicConnectionId server_connection_id,
QuicFramer* framer,
DelegateInterface* delegate);
@@ -463,6 +477,10 @@
return coalesced_packet_of_higher_space_;
}
+ // Use this address to sent to the peer from now on. If this address is
+ // different from the current one, flush all the queue frames first.
+ void SetDefaultPeerAddress(QuicSocketAddress address);
+
private:
friend class test::QuicPacketCreatorPeer;