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 |
11 #ifndef NET_SPDY_SPDY_PROTOCOL_H_ | 11 #ifndef NET_SPDY_SPDY_PROTOCOL_H_ |
12 #define NET_SPDY_SPDY_PROTOCOL_H_ | 12 #define NET_SPDY_SPDY_PROTOCOL_H_ |
13 | 13 |
14 #include <map> | 14 #include <map> |
15 #include <string> | 15 #include <string> |
16 #include <vector> | 16 #include <vector> |
17 | 17 |
18 #include "base/basictypes.h" | 18 #include "base/basictypes.h" |
19 #include "base/compiler_specific.h" | 19 #include "base/compiler_specific.h" |
20 #include "base/logging.h" | 20 #include "base/logging.h" |
21 #include "base/memory/scoped_ptr.h" | 21 #include "base/memory/scoped_ptr.h" |
22 #include "base/string_piece.h" | 22 #include "base/string_piece.h" |
23 #include "base/sys_byteorder.h" | 23 #include "base/sys_byteorder.h" |
24 #include "net/base/net_export.h" | 24 #include "net/base/net_export.h" |
25 #include "net/spdy/spdy_bitmasks.h" | 25 #include "net/spdy/spdy_bitmasks.h" |
26 | 26 |
27 namespace net { | 27 namespace net { |
28 | 28 |
| 29 // TODO(akalin): Convert this to an enum. |
29 const int32 kSpdyVersion2 = 2; | 30 const int32 kSpdyVersion2 = 2; |
30 const int32 kSpdyVersion3 = 3; | 31 const int32 kSpdyVersion3 = 3; |
| 32 const int32 kSpdyVersion4 = 4; |
31 | 33 |
32 // A SPDY stream id is a 31 bit entity. | 34 // A SPDY stream id is a 31 bit entity. |
33 typedef uint32 SpdyStreamId; | 35 typedef uint32 SpdyStreamId; |
34 | 36 |
35 // Specifies the stream ID used to denote the current session (for | 37 // Specifies the stream ID used to denote the current session (for |
36 // flow control). | 38 // flow control). |
37 const SpdyStreamId kSessionFlowControlStreamId = 0; | 39 const SpdyStreamId kSessionFlowControlStreamId = 0; |
38 | 40 |
39 // Initial window size for a Spdy stream. | 41 // Initial window size for a Spdy stream. |
40 const int32 kSpdyStreamInitialWindowSize = 64 * 1024; // 64 KBytes | 42 const int32 kSpdyStreamInitialWindowSize = 64 * 1024; // 64 KBytes |
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 | 701 |
700 private: | 702 private: |
701 size_t size_; | 703 size_t size_; |
702 bool owns_buffer_; | 704 bool owns_buffer_; |
703 DISALLOW_COPY_AND_ASSIGN(SpdyFrame); | 705 DISALLOW_COPY_AND_ASSIGN(SpdyFrame); |
704 }; | 706 }; |
705 | 707 |
706 } // namespace net | 708 } // namespace net |
707 | 709 |
708 #endif // NET_SPDY_SPDY_PROTOCOL_H_ | 710 #endif // NET_SPDY_SPDY_PROTOCOL_H_ |
OLD | NEW |