OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef NET_QUIC_QUIC_CONFIG_H_ | 5 #ifndef NET_QUIC_QUIC_CONFIG_H_ |
6 #define NET_QUIC_QUIC_CONFIG_H_ | 6 #define NET_QUIC_QUIC_CONFIG_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 class NET_EXPORT_PRIVATE QuicNegotiableValue : public QuicConfigValue { | 61 class NET_EXPORT_PRIVATE QuicNegotiableValue : public QuicConfigValue { |
62 public: | 62 public: |
63 QuicNegotiableValue(QuicTag tag, QuicConfigPresence presence); | 63 QuicNegotiableValue(QuicTag tag, QuicConfigPresence presence); |
64 ~QuicNegotiableValue() override; | 64 ~QuicNegotiableValue() override; |
65 | 65 |
66 bool negotiated() const { | 66 bool negotiated() const { |
67 return negotiated_; | 67 return negotiated_; |
68 } | 68 } |
69 | 69 |
70 protected: | 70 protected: |
| 71 void set_negotiated(bool negotiated) { negotiated_ = negotiated; } |
| 72 |
| 73 private: |
71 bool negotiated_; | 74 bool negotiated_; |
72 }; | 75 }; |
73 | 76 |
74 class NET_EXPORT_PRIVATE QuicNegotiableUint32 : public QuicNegotiableValue { | 77 class NET_EXPORT_PRIVATE QuicNegotiableUint32 : public QuicNegotiableValue { |
75 public: | 78 public: |
76 // Default and max values default to 0. | 79 // Default and max values default to 0. |
77 QuicNegotiableUint32(QuicTag name, QuicConfigPresence presence); | 80 QuicNegotiableUint32(QuicTag name, QuicConfigPresence presence); |
78 ~QuicNegotiableUint32() override; | 81 ~QuicNegotiableUint32() override; |
79 | 82 |
80 // Sets the maximum possible value that can be achieved after negotiation and | 83 // Sets the maximum possible value that can be achieved after negotiation and |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 } | 303 } |
301 | 304 |
302 void set_max_undecryptable_packets(size_t max_undecryptable_packets) { | 305 void set_max_undecryptable_packets(size_t max_undecryptable_packets) { |
303 max_undecryptable_packets_ = max_undecryptable_packets; | 306 max_undecryptable_packets_ = max_undecryptable_packets; |
304 } | 307 } |
305 | 308 |
306 size_t max_undecryptable_packets() const { | 309 size_t max_undecryptable_packets() const { |
307 return max_undecryptable_packets_; | 310 return max_undecryptable_packets_; |
308 } | 311 } |
309 | 312 |
| 313 // Sets the peer's connection id length, in bytes. |
| 314 void SetBytesForConnectionIdToSend(uint32 bytes); |
| 315 |
| 316 bool HasReceivedBytesForConnectionId() const; |
| 317 |
| 318 uint32 ReceivedBytesForConnectionId() const; |
| 319 |
310 // Sets the peer's default initial congestion window in packets. | 320 // Sets the peer's default initial congestion window in packets. |
311 void SetInitialCongestionWindowToSend(size_t initial_window); | 321 void SetInitialCongestionWindowToSend(size_t initial_window); |
312 | 322 |
313 bool HasReceivedInitialCongestionWindow() const; | 323 bool HasReceivedInitialCongestionWindow() const; |
314 | 324 |
315 uint32 ReceivedInitialCongestionWindow() const; | 325 uint32 ReceivedInitialCongestionWindow() const; |
316 | 326 |
317 // Sets an estimated initial round trip time in us. | 327 // Sets an estimated initial round trip time in us. |
318 void SetInitialRoundTripTimeUsToSend(size_t rtt_us); | 328 void SetInitialRoundTripTimeUsToSend(size_t rtt_us); |
319 | 329 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 // Congestion control feedback type. | 402 // Congestion control feedback type. |
393 QuicNegotiableTag congestion_feedback_; | 403 QuicNegotiableTag congestion_feedback_; |
394 // Connection options. | 404 // Connection options. |
395 QuicFixedTagVector connection_options_; | 405 QuicFixedTagVector connection_options_; |
396 // Idle connection state lifetime | 406 // Idle connection state lifetime |
397 QuicNegotiableUint32 idle_connection_state_lifetime_seconds_; | 407 QuicNegotiableUint32 idle_connection_state_lifetime_seconds_; |
398 // Keepalive timeout, or 0 to turn off keepalive probes | 408 // Keepalive timeout, or 0 to turn off keepalive probes |
399 QuicNegotiableUint32 keepalive_timeout_seconds_; | 409 QuicNegotiableUint32 keepalive_timeout_seconds_; |
400 // Maximum number of streams that the connection can support. | 410 // Maximum number of streams that the connection can support. |
401 QuicNegotiableUint32 max_streams_per_connection_; | 411 QuicNegotiableUint32 max_streams_per_connection_; |
| 412 // The number of bytes required for the connection ID. |
| 413 QuicFixedUint32 bytes_for_connection_id_; |
402 // Initial congestion window in packets. | 414 // Initial congestion window in packets. |
403 QuicFixedUint32 initial_congestion_window_; | 415 QuicFixedUint32 initial_congestion_window_; |
404 // Initial round trip time estimate in microseconds. | 416 // Initial round trip time estimate in microseconds. |
405 QuicFixedUint32 initial_round_trip_time_us_; | 417 QuicFixedUint32 initial_round_trip_time_us_; |
406 | 418 |
407 // TODO(rjshade): Remove when removing QUIC_VERSION_19. | 419 // TODO(rjshade): Remove when removing QUIC_VERSION_19. |
408 // Initial flow control receive window in bytes. | 420 // Initial flow control receive window in bytes. |
409 QuicFixedUint32 initial_flow_control_window_bytes_; | 421 QuicFixedUint32 initial_flow_control_window_bytes_; |
410 | 422 |
411 // Initial stream flow control receive window in bytes. | 423 // Initial stream flow control receive window in bytes. |
412 QuicFixedUint32 initial_stream_flow_control_window_bytes_; | 424 QuicFixedUint32 initial_stream_flow_control_window_bytes_; |
413 // Initial session flow control receive window in bytes. | 425 // Initial session flow control receive window in bytes. |
414 QuicFixedUint32 initial_session_flow_control_window_bytes_; | 426 QuicFixedUint32 initial_session_flow_control_window_bytes_; |
415 | 427 |
416 // Socket receive buffer in bytes. | 428 // Socket receive buffer in bytes. |
417 QuicFixedUint32 socket_receive_buffer_; | 429 QuicFixedUint32 socket_receive_buffer_; |
418 }; | 430 }; |
419 | 431 |
420 } // namespace net | 432 } // namespace net |
421 | 433 |
422 #endif // NET_QUIC_QUIC_CONFIG_H_ | 434 #endif // NET_QUIC_QUIC_CONFIG_H_ |
OLD | NEW |