| 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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 bool ProcessSetting(const char* data); | 585 bool ProcessSetting(const char* data); |
| 586 | 586 |
| 587 // Retrieve serialized length of SpdyHeaderBlock. If compression is enabled, a | 587 // Retrieve serialized length of SpdyHeaderBlock. If compression is enabled, a |
| 588 // maximum estimate is returned. | 588 // maximum estimate is returned. |
| 589 size_t GetSerializedLength(const SpdyHeaderBlock& headers); | 589 size_t GetSerializedLength(const SpdyHeaderBlock& headers); |
| 590 | 590 |
| 591 // Get (and lazily initialize) the ZLib state. | 591 // Get (and lazily initialize) the ZLib state. |
| 592 z_stream* GetHeaderCompressor(); | 592 z_stream* GetHeaderCompressor(); |
| 593 z_stream* GetHeaderDecompressor(); | 593 z_stream* GetHeaderDecompressor(); |
| 594 | 594 |
| 595 // Get (and lazily initialize) the HPACK state. |
| 596 HpackEncoder* GetHpackEncoder(); |
| 597 HpackDecoder* GetHpackDecoder(); |
| 598 |
| 595 size_t GetNumberRequiredContinuationFrames(size_t size); | 599 size_t GetNumberRequiredContinuationFrames(size_t size); |
| 596 | 600 |
| 597 void WritePayloadWithContinuation(SpdyFrameBuilder* builder, | 601 void WritePayloadWithContinuation(SpdyFrameBuilder* builder, |
| 598 const std::string& hpack_encoding, | 602 const std::string& hpack_encoding, |
| 599 SpdyStreamId stream_id, | 603 SpdyStreamId stream_id, |
| 600 SpdyFrameType type); | 604 SpdyFrameType type); |
| 601 | 605 |
| 602 private: | 606 private: |
| 603 // Deliver the given control frame's uncompressed headers block to the | 607 // Deliver the given control frame's uncompressed headers block to the |
| 604 // visitor in chunks. Returns true if the visitor has accepted all of the | 608 // visitor in chunks. Returns true if the visitor has accepted all of the |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 // If a HEADERS frame is followed by a CONTINUATION frame, the FIN/END_STREAM | 740 // If a HEADERS frame is followed by a CONTINUATION frame, the FIN/END_STREAM |
| 737 // flag is still carried in the HEADERS frame. If it's set, flip this so that | 741 // flag is still carried in the HEADERS frame. If it's set, flip this so that |
| 738 // we know to terminate the stream when the entire header block has been | 742 // we know to terminate the stream when the entire header block has been |
| 739 // processed. | 743 // processed. |
| 740 bool end_stream_when_done_; | 744 bool end_stream_when_done_; |
| 741 }; | 745 }; |
| 742 | 746 |
| 743 } // namespace net | 747 } // namespace net |
| 744 | 748 |
| 745 #endif // NET_SPDY_SPDY_FRAMER_H_ | 749 #endif // NET_SPDY_SPDY_FRAMER_H_ |
| OLD | NEW |