class NET_EXPORT_PRIVATE QuicNegotiableValue : public QuicConfigValue {
public:
QuicNegotiableValue(QuicTag tag, QuicConfigPresence presence);
- virtual ~QuicNegotiableValue();
+ ~QuicNegotiableValue() override;
bool negotiated() const {
return negotiated_;
}
protected:
+ void set_negotiated(bool negotiated) { negotiated_ = negotiated; }
+
+ private:
bool negotiated_;
};
public:
// Default and max values default to 0.
QuicNegotiableUint32(QuicTag name, QuicConfigPresence presence);
- virtual ~QuicNegotiableUint32();
+ ~QuicNegotiableUint32() override;
// Sets the maximum possible value that can be achieved after negotiation and
// also the default values to be assumed if PRESENCE_OPTIONAL and the *HLO msg
// Serialises |name_| and value to |out|. If |negotiated_| is true then
// |negotiated_value_| is serialised, otherwise |max_value_| is serialised.
- virtual void ToHandshakeMessage(CryptoHandshakeMessage* out) const OVERRIDE;
+ void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
// Sets |negotiated_value_| to the minimum of |max_value_| and the
// corresponding value from |peer_hello|. If the corresponding value is
// missing and PRESENCE_OPTIONAL then |negotiated_value_| is set to
// |default_value_|.
- virtual QuicErrorCode ProcessPeerHello(
- const CryptoHandshakeMessage& peer_hello,
- HelloType hello_type,
- std::string* error_details) OVERRIDE;
+ QuicErrorCode ProcessPeerHello(const CryptoHandshakeMessage& peer_hello,
+ HelloType hello_type,
+ std::string* error_details) override;
private:
uint32 max_value_;
class NET_EXPORT_PRIVATE QuicNegotiableTag : public QuicNegotiableValue {
public:
QuicNegotiableTag(QuicTag name, QuicConfigPresence presence);
- virtual ~QuicNegotiableTag();
+ ~QuicNegotiableTag() override;
// Sets the possible values that |negotiated_tag_| can take after negotiation
// and the default value that |negotiated_tag_| takes if OPTIONAL and *HLO
// Serialises |name_| and vector (either possible or negotiated) to |out|. If
// |negotiated_| is true then |negotiated_tag_| is serialised, otherwise
// |possible_values_| is serialised.
- virtual void ToHandshakeMessage(CryptoHandshakeMessage* out) const OVERRIDE;
+ void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
// Selects the tag common to both tags in |client_hello| for |name_| and
// |possible_values_| with preference to tag in |possible_values_|. The
// selected tag is set as |negotiated_tag_|.
- virtual QuicErrorCode ProcessPeerHello(
- const CryptoHandshakeMessage& peer_hello,
- HelloType hello_type,
- std::string* error_details) OVERRIDE;
+ QuicErrorCode ProcessPeerHello(const CryptoHandshakeMessage& peer_hello,
+ HelloType hello_type,
+ std::string* error_details) override;
private:
// Reads the vector corresponding to |name_| from |msg| into |out|. If the
class NET_EXPORT_PRIVATE QuicFixedUint32 : public QuicConfigValue {
public:
QuicFixedUint32(QuicTag name, QuicConfigPresence presence);
- virtual ~QuicFixedUint32();
+ ~QuicFixedUint32() override;
bool HasSendValue() const;
void SetReceivedValue(uint32 value);
// If has_send_value is true, serialises |tag_| and |send_value_| to |out|.
- virtual void ToHandshakeMessage(CryptoHandshakeMessage* out) const OVERRIDE;
+ void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
// Sets |value_| to the corresponding value from |peer_hello_| if it exists.
- virtual QuicErrorCode ProcessPeerHello(
- const CryptoHandshakeMessage& peer_hello,
- HelloType hello_type,
- std::string* error_details) OVERRIDE;
+ QuicErrorCode ProcessPeerHello(const CryptoHandshakeMessage& peer_hello,
+ HelloType hello_type,
+ std::string* error_details) override;
private:
uint32 send_value_;
class NET_EXPORT_PRIVATE QuicFixedTag : public QuicConfigValue {
public:
QuicFixedTag(QuicTag name, QuicConfigPresence presence);
- virtual ~QuicFixedTag();
+ ~QuicFixedTag() override;
bool HasSendValue() const;
void SetReceivedValue(QuicTag value);
// If has_send_value is true, serialises |tag_| and |send_value_| to |out|.
- virtual void ToHandshakeMessage(CryptoHandshakeMessage* out) const OVERRIDE;
+ void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
// Sets |value_| to the corresponding value from |client_hello_| if it exists.
- virtual QuicErrorCode ProcessPeerHello(
- const CryptoHandshakeMessage& peer_hello,
- HelloType hello_type,
- std::string* error_details) OVERRIDE;
+ QuicErrorCode ProcessPeerHello(const CryptoHandshakeMessage& peer_hello,
+ HelloType hello_type,
+ std::string* error_details) override;
private:
QuicTag send_value_;
class NET_EXPORT_PRIVATE QuicFixedTagVector : public QuicConfigValue {
public:
QuicFixedTagVector(QuicTag name, QuicConfigPresence presence);
- virtual ~QuicFixedTagVector();
+ ~QuicFixedTagVector() override;
bool HasSendValues() const;
// If has_send_value is true, serialises |tag_vector_| and |send_value_| to
// |out|.
- virtual void ToHandshakeMessage(CryptoHandshakeMessage* out) const OVERRIDE;
+ void ToHandshakeMessage(CryptoHandshakeMessage* out) const override;
// Sets |receive_values_| to the corresponding value from |client_hello_| if
// it exists.
- virtual QuicErrorCode ProcessPeerHello(
- const CryptoHandshakeMessage& peer_hello,
- HelloType hello_type,
- std::string* error_details) OVERRIDE;
+ QuicErrorCode ProcessPeerHello(const CryptoHandshakeMessage& peer_hello,
+ HelloType hello_type,
+ std::string* error_details) override;
private:
QuicTagVector send_values_;
QuicConfig();
~QuicConfig();
- void set_congestion_feedback(const QuicTagVector& congestion_feedback,
- QuicTag default_congestion_feedback);
+ void SetCongestionFeedback(const QuicTagVector& congestion_feedback,
+ QuicTag default_congestion_feedback);
- QuicTag congestion_feedback() const;
+ QuicTag CongestionFeedback() const;
void SetConnectionOptionsToSend(const QuicTagVector& connection_options);
QuicTagVector SendConnectionOptions() const;
- void SetLossDetectionToSend(QuicTag loss_detection);
-
- bool HasReceivedLossDetection() const;
-
- QuicTag ReceivedLossDetection() const;
-
- void set_idle_connection_state_lifetime(
+ void SetIdleConnectionStateLifetime(
QuicTime::Delta max_idle_connection_state_lifetime,
QuicTime::Delta default_idle_conection_state_lifetime);
- QuicTime::Delta idle_connection_state_lifetime() const;
+ QuicTime::Delta IdleConnectionStateLifetime() const;
- QuicTime::Delta keepalive_timeout() const;
+ QuicTime::Delta KeepaliveTimeout() const;
- void set_max_streams_per_connection(size_t max_streams,
- size_t default_streams);
+ void SetMaxStreamsPerConnection(size_t max_streams, size_t default_streams);
- uint32 max_streams_per_connection() const;
+ uint32 MaxStreamsPerConnection() const;
void set_max_time_before_crypto_handshake(
- QuicTime::Delta max_time_before_crypto_handshake);
+ QuicTime::Delta max_time_before_crypto_handshake) {
+ max_time_before_crypto_handshake_ = max_time_before_crypto_handshake;
+ }
+
+ QuicTime::Delta max_time_before_crypto_handshake() const {
+ return max_time_before_crypto_handshake_;
+ }
+
+ void set_max_idle_time_before_crypto_handshake(
+ QuicTime::Delta max_idle_time_before_crypto_handshake) {
+ max_idle_time_before_crypto_handshake_ =
+ max_idle_time_before_crypto_handshake;
+ }
+
+ QuicTime::Delta max_idle_time_before_crypto_handshake() const {
+ return max_idle_time_before_crypto_handshake_;
+ }
+
+ void set_max_undecryptable_packets(size_t max_undecryptable_packets) {
+ max_undecryptable_packets_ = max_undecryptable_packets;
+ }
+
+ size_t max_undecryptable_packets() const {
+ return max_undecryptable_packets_;
+ }
+
+ bool HasSetBytesForConnectionIdToSend() const;
+
+ // Sets the peer's connection id length, in bytes.
+ void SetBytesForConnectionIdToSend(uint32 bytes);
+
+ bool HasReceivedBytesForConnectionId() const;
- QuicTime::Delta max_time_before_crypto_handshake() const;
+ uint32 ReceivedBytesForConnectionId() const;
// Sets the peer's default initial congestion window in packets.
void SetInitialCongestionWindowToSend(size_t initial_window);
uint32 ReceivedSocketReceiveBuffer() const;
- bool negotiated();
-
- // SetDefaults sets the members to sensible, default values.
- void SetDefaults();
+ bool negotiated() const;
// ToHandshakeMessage serialises the settings in this object as a series of
// tags /value pairs and adds them to |out|.
private:
friend class test::QuicConfigPeer;
+ // SetDefaults sets the members to sensible, default values.
+ void SetDefaults();
+
+ // Configurations options that are not negotiated.
+ // Maximum time the session can be alive before crypto handshake is finished.
+ QuicTime::Delta max_time_before_crypto_handshake_;
+ // Maximum idle time before the crypto handshake has completed.
+ QuicTime::Delta max_idle_time_before_crypto_handshake_;
+ // Maximum number of undecryptable packets stored before CHLO/SHLO.
+ size_t max_undecryptable_packets_;
+
// Congestion control feedback type.
QuicNegotiableTag congestion_feedback_;
// Connection options.
QuicFixedTagVector connection_options_;
- // Loss detection feedback type.
- QuicFixedTag loss_detection_;
// Idle connection state lifetime
QuicNegotiableUint32 idle_connection_state_lifetime_seconds_;
// Keepalive timeout, or 0 to turn off keepalive probes
QuicNegotiableUint32 keepalive_timeout_seconds_;
// Maximum number of streams that the connection can support.
QuicNegotiableUint32 max_streams_per_connection_;
- // Maximum time till the session can be alive before crypto handshake is
- // finished. (Not negotiated).
- QuicTime::Delta max_time_before_crypto_handshake_;
+ // The number of bytes required for the connection ID.
+ QuicFixedUint32 bytes_for_connection_id_;
// Initial congestion window in packets.
QuicFixedUint32 initial_congestion_window_;
// Initial round trip time estimate in microseconds.