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_FRAMER_H_ | 5 #ifndef NET_SPDY_SPDY_FRAMER_H_ |
6 #define NET_SPDY_SPDY_FRAMER_H_ | 6 #define NET_SPDY_SPDY_FRAMER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 size_t GetSynStreamMinimumSize() const; | 481 size_t GetSynStreamMinimumSize() const; |
482 size_t GetSynReplyMinimumSize() const; | 482 size_t GetSynReplyMinimumSize() const; |
483 size_t GetRstStreamSize() const; | 483 size_t GetRstStreamSize() const; |
484 size_t GetSettingsMinimumSize() const; | 484 size_t GetSettingsMinimumSize() const; |
485 size_t GetPingSize() const; | 485 size_t GetPingSize() const; |
486 size_t GetGoAwaySize() const; | 486 size_t GetGoAwaySize() const; |
487 size_t GetHeadersMinimumSize() const; | 487 size_t GetHeadersMinimumSize() const; |
488 size_t GetWindowUpdateSize() const; | 488 size_t GetWindowUpdateSize() const; |
489 size_t GetCredentialMinimumSize() const; | 489 size_t GetCredentialMinimumSize() const; |
490 | 490 |
| 491 // Returns the maximum payload size of a DATA frame. |
| 492 size_t GetDataFrameMaximumPayload() const; |
| 493 |
491 // For debugging. | 494 // For debugging. |
492 static const char* StateToString(int state); | 495 static const char* StateToString(int state); |
493 static const char* ErrorCodeToString(int error_code); | 496 static const char* ErrorCodeToString(int error_code); |
494 static const char* StatusCodeToString(int status_code); | 497 static const char* StatusCodeToString(int status_code); |
495 static const char* ControlTypeToString(SpdyControlType type); | 498 static const char* ControlTypeToString(SpdyControlType type); |
496 | 499 |
497 int protocol_version() const { return spdy_version_; } | 500 int protocol_version() const { return spdy_version_; } |
498 | 501 |
499 bool probable_http_response() const { return probable_http_response_; } | 502 bool probable_http_response() const { return probable_http_response_; } |
500 | 503 |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 // starts with HTTP. If it does, we likely have an HTTP response. This | 682 // starts with HTTP. If it does, we likely have an HTTP response. This |
680 // isn't guaranteed though: we could have gotten a settings frame and then | 683 // isn't guaranteed though: we could have gotten a settings frame and then |
681 // corrupt data that just looks like HTTP, but deterministic checking requires | 684 // corrupt data that just looks like HTTP, but deterministic checking requires |
682 // a lot more state. | 685 // a lot more state. |
683 bool probable_http_response_; | 686 bool probable_http_response_; |
684 }; | 687 }; |
685 | 688 |
686 } // namespace net | 689 } // namespace net |
687 | 690 |
688 #endif // NET_SPDY_SPDY_FRAMER_H_ | 691 #endif // NET_SPDY_SPDY_FRAMER_H_ |
OLD | NEW |