| 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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 // for this value as opposed to a constant. | 488 // for this value as opposed to a constant. |
| 489 static size_t GetDataFrameMinimumSize(); | 489 static size_t GetDataFrameMinimumSize(); |
| 490 | 490 |
| 491 // Size, in bytes, of the control frame header. | 491 // Size, in bytes, of the control frame header. |
| 492 static size_t GetControlFrameHeaderSize(SpdyMajorVersion version); | 492 static size_t GetControlFrameHeaderSize(SpdyMajorVersion version); |
| 493 | 493 |
| 494 static size_t GetPrefixLength(SpdyFrameType type, SpdyMajorVersion version); | 494 static size_t GetPrefixLength(SpdyFrameType type, SpdyMajorVersion version); |
| 495 | 495 |
| 496 static size_t GetFrameMaximumSize(SpdyMajorVersion version); | 496 static size_t GetFrameMaximumSize(SpdyMajorVersion version); |
| 497 | 497 |
| 498 // Returns the size of a header block size field. Valid only for SPDY |
| 499 // versions <= 3. |
| 500 static size_t GetSizeOfSizeField(SpdyMajorVersion version); |
| 501 |
| 498 static SpdyMajorVersion ParseMajorVersion(int version_number); | 502 static SpdyMajorVersion ParseMajorVersion(int version_number); |
| 499 | 503 |
| 500 static int SerializeMajorVersion(SpdyMajorVersion version); | 504 static int SerializeMajorVersion(SpdyMajorVersion version); |
| 501 | 505 |
| 502 static std::string GetVersionString(SpdyMajorVersion version); | 506 static std::string GetVersionString(SpdyMajorVersion version); |
| 503 }; | 507 }; |
| 504 | 508 |
| 505 class SpdyFrame; | 509 class SpdyFrame; |
| 506 typedef SpdyFrame SpdySerializedFrame; | 510 typedef SpdyFrame SpdySerializedFrame; |
| 507 | 511 |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 987 SpdyFrameVisitor() {} | 991 SpdyFrameVisitor() {} |
| 988 virtual ~SpdyFrameVisitor() {} | 992 virtual ~SpdyFrameVisitor() {} |
| 989 | 993 |
| 990 private: | 994 private: |
| 991 DISALLOW_COPY_AND_ASSIGN(SpdyFrameVisitor); | 995 DISALLOW_COPY_AND_ASSIGN(SpdyFrameVisitor); |
| 992 }; | 996 }; |
| 993 | 997 |
| 994 } // namespace net | 998 } // namespace net |
| 995 | 999 |
| 996 #endif // NET_SPDY_SPDY_PROTOCOL_H_ | 1000 #endif // NET_SPDY_SPDY_PROTOCOL_H_ |
| OLD | NEW |