Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Unified Diff: net/quic/quic_config.h

Issue 2011933002: Add alternate server address to QuicConfig. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@122546126
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/crypto/crypto_protocol.h ('k') | net/quic/quic_config.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_config.h
diff --git a/net/quic/quic_config.h b/net/quic/quic_config.h
index 7d40adc1b9817fc6c70ea4fa382311961169ab70..2a7ed5fc81cda5ea13de729ed681f5795141fe6a 100644
--- a/net/quic/quic_config.h
+++ b/net/quic/quic_config.h
@@ -215,6 +215,37 @@ class NET_EXPORT_PRIVATE QuicFixedTagVector : public QuicConfigValue {
bool has_receive_values_;
};
+// Stores IPEndPoint from CHLO or SHLO messages that are not negotiated.
+class QuicFixedIPEndPoint : public QuicConfigValue {
+ public:
+ QuicFixedIPEndPoint(QuicTag tag, QuicConfigPresence presence);
+ ~QuicFixedIPEndPoint() override;
+
+ bool HasSendValue() const;
+
+ const IPEndPoint& GetSendValue() const;
+
+ void SetSendValue(const IPEndPoint& value);
+
+ bool HasReceivedValue() const;
+
+ const IPEndPoint& GetReceivedValue() const;
+
+ void SetReceivedValue(const IPEndPoint& value);
+
+ void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
+
+ QuicErrorCode ProcessPeerHello(const CryptoHandshakeMessage& peer_hello,
+ HelloType hello_type,
+ std::string* error_details) override;
+
+ private:
+ IPEndPoint send_value_;
+ bool has_send_value_;
+ IPEndPoint receive_value_;
+ bool has_receive_value_;
+};
+
// QuicConfig contains non-crypto configuration options that are negotiated in
// the crypto handshake.
class NET_EXPORT_PRIVATE QuicConfig {
@@ -339,6 +370,13 @@ class NET_EXPORT_PRIVATE QuicConfig {
bool DisableConnectionMigration() const;
+ void SetAlternateServerAddressToSend(
+ const IPEndPoint& alternate_server_address);
+
+ bool HasReceivedAlternateServerAddress() const;
+
+ const IPEndPoint& ReceivedAlternateServerAddress() const;
+
bool negotiated() const;
// ToHandshakeMessage serialises the settings in this object as a series of
@@ -392,6 +430,9 @@ class NET_EXPORT_PRIVATE QuicConfig {
// Whether tell peer not to attempt connection migration.
QuicFixedUint32 connection_migration_disabled_;
+
+ // An alternate server address the client could connect to.
+ QuicFixedIPEndPoint alternate_server_address_;
};
} // namespace net
« no previous file with comments | « net/quic/crypto/crypto_protocol.h ('k') | net/quic/quic_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698