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_SPDY_SPDY_SESSION_H_ | 5 #ifndef NET_SPDY_SPDY_SESSION_H_ |
6 #define NET_SPDY_SPDY_SESSION_H_ | 6 #define NET_SPDY_SPDY_SESSION_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 const int kMaxSpdyFrameChunkSize = (2 * kMss) - 8; | 60 const int kMaxSpdyFrameChunkSize = (2 * kMss) - 8; |
61 | 61 |
62 // Default value of SETTINGS_INITIAL_WINDOW_SIZE per protocol specification. | 62 // Default value of SETTINGS_INITIAL_WINDOW_SIZE per protocol specification. |
63 // A session is always created with this initial window size. | 63 // A session is always created with this initial window size. |
64 const int32_t kDefaultInitialWindowSize = 65535; | 64 const int32_t kDefaultInitialWindowSize = 65535; |
65 | 65 |
66 // Maximum number of concurrent streams we will create, unless the server | 66 // Maximum number of concurrent streams we will create, unless the server |
67 // sends a SETTINGS frame with a different value. | 67 // sends a SETTINGS frame with a different value. |
68 const size_t kInitialMaxConcurrentStreams = 100; | 68 const size_t kInitialMaxConcurrentStreams = 100; |
69 | 69 |
| 70 // Specifies the maximum HPACK dynamic table size the server is allowed to set. |
| 71 const int kMaxHeaderTableSize = 64 * 1024; |
| 72 |
70 // Specifies the maximum concurrent streams server could send (via push). | 73 // Specifies the maximum concurrent streams server could send (via push). |
71 const int kMaxConcurrentPushedStreams = 1000; | 74 const int kMaxConcurrentPushedStreams = 1000; |
72 | 75 |
73 // If more than this many bytes have been read or more than that many | 76 // If more than this many bytes have been read or more than that many |
74 // milliseconds have passed, return ERR_IO_PENDING from ReadLoop. | 77 // milliseconds have passed, return ERR_IO_PENDING from ReadLoop. |
75 const int kYieldAfterBytesRead = 32 * 1024; | 78 const int kYieldAfterBytesRead = 32 * 1024; |
76 const int kYieldAfterDurationMilliseconds = 20; | 79 const int kYieldAfterDurationMilliseconds = 20; |
77 | 80 |
78 // First and last valid stream IDs. As we always act as the client, | 81 // First and last valid stream IDs. As we always act as the client, |
79 // start at 1 for the first stream id. | 82 // start at 1 for the first stream id. |
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1206 // Used for posting asynchronous IO tasks. We use this even though | 1209 // Used for posting asynchronous IO tasks. We use this even though |
1207 // SpdySession is refcounted because we don't need to keep the SpdySession | 1210 // SpdySession is refcounted because we don't need to keep the SpdySession |
1208 // alive if the last reference is within a RunnableMethod. Just revoke the | 1211 // alive if the last reference is within a RunnableMethod. Just revoke the |
1209 // method. | 1212 // method. |
1210 base::WeakPtrFactory<SpdySession> weak_factory_; | 1213 base::WeakPtrFactory<SpdySession> weak_factory_; |
1211 }; | 1214 }; |
1212 | 1215 |
1213 } // namespace net | 1216 } // namespace net |
1214 | 1217 |
1215 #endif // NET_SPDY_SPDY_SESSION_H_ | 1218 #endif // NET_SPDY_SPDY_SESSION_H_ |
OLD | NEW |