| 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 // This file contains some protocol structures for use with SPDY 2 and 3 | 5 // This file contains some protocol structures for use with SPDY 2 and 3 |
| 6 // The SPDY 2 spec can be found at: | 6 // The SPDY 2 spec can be found at: |
| 7 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft2 | 7 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft2 |
| 8 // The SPDY 3 spec can be found at: | 8 // The SPDY 3 spec can be found at: |
| 9 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3 | 9 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3 |
| 10 | 10 |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 static size_t GetControlFrameHeaderSize(SpdyMajorVersion version); | 504 static size_t GetControlFrameHeaderSize(SpdyMajorVersion version); |
| 505 | 505 |
| 506 static size_t GetPrefixLength(SpdyFrameType type, SpdyMajorVersion version); | 506 static size_t GetPrefixLength(SpdyFrameType type, SpdyMajorVersion version); |
| 507 | 507 |
| 508 static size_t GetFrameMaximumSize(SpdyMajorVersion version); | 508 static size_t GetFrameMaximumSize(SpdyMajorVersion version); |
| 509 | 509 |
| 510 // Returns the size of a header block size field. Valid only for SPDY | 510 // Returns the size of a header block size field. Valid only for SPDY |
| 511 // versions <= 3. | 511 // versions <= 3. |
| 512 static size_t GetSizeOfSizeField(SpdyMajorVersion version); | 512 static size_t GetSizeOfSizeField(SpdyMajorVersion version); |
| 513 | 513 |
| 514 // Returns the size (in bytes) of a wire setting ID and value. |
| 515 static size_t GetSettingSize(SpdyMajorVersion version); |
| 516 |
| 514 static SpdyMajorVersion ParseMajorVersion(int version_number); | 517 static SpdyMajorVersion ParseMajorVersion(int version_number); |
| 515 | 518 |
| 516 static int SerializeMajorVersion(SpdyMajorVersion version); | 519 static int SerializeMajorVersion(SpdyMajorVersion version); |
| 517 | 520 |
| 518 static std::string GetVersionString(SpdyMajorVersion version); | 521 static std::string GetVersionString(SpdyMajorVersion version); |
| 519 }; | 522 }; |
| 520 | 523 |
| 521 class SpdyFrame; | 524 class SpdyFrame; |
| 522 typedef SpdyFrame SpdySerializedFrame; | 525 typedef SpdyFrame SpdySerializedFrame; |
| 523 | 526 |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1041 SpdyFrameVisitor() {} | 1044 SpdyFrameVisitor() {} |
| 1042 virtual ~SpdyFrameVisitor() {} | 1045 virtual ~SpdyFrameVisitor() {} |
| 1043 | 1046 |
| 1044 private: | 1047 private: |
| 1045 DISALLOW_COPY_AND_ASSIGN(SpdyFrameVisitor); | 1048 DISALLOW_COPY_AND_ASSIGN(SpdyFrameVisitor); |
| 1046 }; | 1049 }; |
| 1047 | 1050 |
| 1048 } // namespace net | 1051 } // namespace net |
| 1049 | 1052 |
| 1050 #endif // NET_SPDY_SPDY_PROTOCOL_H_ | 1053 #endif // NET_SPDY_SPDY_PROTOCOL_H_ |
| OLD | NEW |