| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PROTOCOL_H_ | 5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_ |
| 6 #define NET_QUIC_QUIC_PROTOCOL_H_ | 6 #define NET_QUIC_QUIC_PROTOCOL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <list> | 10 #include <list> |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 101 |
| 102 // Reserved ID for the crypto stream. | 102 // Reserved ID for the crypto stream. |
| 103 const QuicStreamId kCryptoStreamId = 1; | 103 const QuicStreamId kCryptoStreamId = 1; |
| 104 | 104 |
| 105 // Reserved ID for the headers stream. | 105 // Reserved ID for the headers stream. |
| 106 const QuicStreamId kHeadersStreamId = 3; | 106 const QuicStreamId kHeadersStreamId = 3; |
| 107 | 107 |
| 108 // Maximum delayed ack time, in ms. | 108 // Maximum delayed ack time, in ms. |
| 109 const int kMaxDelayedAckTimeMs = 25; | 109 const int kMaxDelayedAckTimeMs = 25; |
| 110 | 110 |
| 111 // This is the default network timeout a for connection till the crypto | 111 // The default idle timeout before the crypto handshake succeeds. |
| 112 // handshake succeeds and the negotiated timeout from the handshake is received. | |
| 113 const int64 kDefaultInitialTimeoutSecs = 120; // 2 mins. | 112 const int64 kDefaultInitialTimeoutSecs = 120; // 2 mins. |
| 114 const int64 kDefaultTimeoutSecs = 60 * 10; // 10 minutes. | 113 // The maximum idle timeout that can be negotiated. |
| 115 const int64 kDefaultMaxTimeForCryptoHandshakeSecs = 5; // 5 secs. | 114 const int64 kMaximumIdleTimeoutSecs = 60 * 10; // 10 minutes. |
| 115 // The default timeout for a connection until the crypto handshake succeeds. |
| 116 const int64 kDefaultMaxTimeForCryptoHandshakeSecs = 10; // 10 secs. |
| 116 | 117 |
| 117 // Default ping timeout. | 118 // Default ping timeout. |
| 118 const int64 kPingTimeoutSecs = 15; // 15 secs. | 119 const int64 kPingTimeoutSecs = 15; // 15 secs. |
| 119 | 120 |
| 120 // Minimum number of RTTs between Server Config Updates (SCUP) sent to client. | 121 // Minimum number of RTTs between Server Config Updates (SCUP) sent to client. |
| 121 const int kMinIntervalBetweenServerConfigUpdatesRTTs = 10; | 122 const int kMinIntervalBetweenServerConfigUpdatesRTTs = 10; |
| 122 | 123 |
| 123 // Minimum time between Server Config Updates (SCUP) sent to client. | 124 // Minimum time between Server Config Updates (SCUP) sent to client. |
| 124 const int kMinIntervalBetweenServerConfigUpdatesMs = 1000; | 125 const int kMinIntervalBetweenServerConfigUpdatesMs = 1000; |
| 125 | 126 |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 // deprecated: QUIC_STREAM_RST_BEFORE_HEADERS_DECOMPRESSED = 21 | 466 // deprecated: QUIC_STREAM_RST_BEFORE_HEADERS_DECOMPRESSED = 21 |
| 466 | 467 |
| 467 // The Header ID for a stream was too far from the previous. | 468 // The Header ID for a stream was too far from the previous. |
| 468 QUIC_INVALID_HEADER_ID = 22, | 469 QUIC_INVALID_HEADER_ID = 22, |
| 469 // Negotiable parameter received during handshake had invalid value. | 470 // Negotiable parameter received during handshake had invalid value. |
| 470 QUIC_INVALID_NEGOTIATED_VALUE = 23, | 471 QUIC_INVALID_NEGOTIATED_VALUE = 23, |
| 471 // There was an error decompressing data. | 472 // There was an error decompressing data. |
| 472 QUIC_DECOMPRESSION_FAILURE = 24, | 473 QUIC_DECOMPRESSION_FAILURE = 24, |
| 473 // We hit our prenegotiated (or default) timeout | 474 // We hit our prenegotiated (or default) timeout |
| 474 QUIC_CONNECTION_TIMED_OUT = 25, | 475 QUIC_CONNECTION_TIMED_OUT = 25, |
| 476 // We hit our overall connection timeout |
| 477 QUIC_CONNECTION_OVERALL_TIMED_OUT = 67, |
| 475 // There was an error encountered migrating addresses | 478 // There was an error encountered migrating addresses |
| 476 QUIC_ERROR_MIGRATING_ADDRESS = 26, | 479 QUIC_ERROR_MIGRATING_ADDRESS = 26, |
| 477 // There was an error while writing to the socket. | 480 // There was an error while writing to the socket. |
| 478 QUIC_PACKET_WRITE_ERROR = 27, | 481 QUIC_PACKET_WRITE_ERROR = 27, |
| 479 // There was an error while reading from the socket. | 482 // There was an error while reading from the socket. |
| 480 QUIC_PACKET_READ_ERROR = 51, | 483 QUIC_PACKET_READ_ERROR = 51, |
| 481 // We received a STREAM_FRAME with no data and no fin flag set. | 484 // We received a STREAM_FRAME with no data and no fin flag set. |
| 482 QUIC_INVALID_STREAM_FRAME = 50, | 485 QUIC_INVALID_STREAM_FRAME = 50, |
| 483 // We received invalid data on the headers stream. | 486 // We received invalid data on the headers stream. |
| 484 QUIC_INVALID_HEADERS_STREAM_DATA = 56, | 487 QUIC_INVALID_HEADERS_STREAM_DATA = 56, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 // A handshake message arrived, but we are still validating the | 543 // A handshake message arrived, but we are still validating the |
| 541 // previous handshake message. | 544 // previous handshake message. |
| 542 QUIC_CRYPTO_MESSAGE_WHILE_VALIDATING_CLIENT_HELLO = 54, | 545 QUIC_CRYPTO_MESSAGE_WHILE_VALIDATING_CLIENT_HELLO = 54, |
| 543 // A server config update arrived before the handshake is complete. | 546 // A server config update arrived before the handshake is complete. |
| 544 QUIC_CRYPTO_UPDATE_BEFORE_HANDSHAKE_COMPLETE = 65, | 547 QUIC_CRYPTO_UPDATE_BEFORE_HANDSHAKE_COMPLETE = 65, |
| 545 // This connection involved a version negotiation which appears to have been | 548 // This connection involved a version negotiation which appears to have been |
| 546 // tampered with. | 549 // tampered with. |
| 547 QUIC_VERSION_NEGOTIATION_MISMATCH = 55, | 550 QUIC_VERSION_NEGOTIATION_MISMATCH = 55, |
| 548 | 551 |
| 549 // No error. Used as bound while iterating. | 552 // No error. Used as bound while iterating. |
| 550 QUIC_LAST_ERROR = 67, | 553 QUIC_LAST_ERROR = 68, |
| 551 }; | 554 }; |
| 552 | 555 |
| 553 struct NET_EXPORT_PRIVATE QuicPacketPublicHeader { | 556 struct NET_EXPORT_PRIVATE QuicPacketPublicHeader { |
| 554 QuicPacketPublicHeader(); | 557 QuicPacketPublicHeader(); |
| 555 explicit QuicPacketPublicHeader(const QuicPacketPublicHeader& other); | 558 explicit QuicPacketPublicHeader(const QuicPacketPublicHeader& other); |
| 556 ~QuicPacketPublicHeader(); | 559 ~QuicPacketPublicHeader(); |
| 557 | 560 |
| 558 // Universal header. All QuicPacket headers will have a connection_id and | 561 // Universal header. All QuicPacket headers will have a connection_id and |
| 559 // public flags. | 562 // public flags. |
| 560 QuicConnectionId connection_id; | 563 QuicConnectionId connection_id; |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1076 SequenceNumberList* all_transmissions; | 1079 SequenceNumberList* all_transmissions; |
| 1077 // In flight packets have not been abandoned or lost. | 1080 // In flight packets have not been abandoned or lost. |
| 1078 bool in_flight; | 1081 bool in_flight; |
| 1079 // True if the packet can never be acked, so it can be removed. | 1082 // True if the packet can never be acked, so it can be removed. |
| 1080 bool is_unackable; | 1083 bool is_unackable; |
| 1081 }; | 1084 }; |
| 1082 | 1085 |
| 1083 } // namespace net | 1086 } // namespace net |
| 1084 | 1087 |
| 1085 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1088 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
| OLD | NEW |