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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 // Given a buffer containing a decompressed header block in SPDY | 364 // Given a buffer containing a decompressed header block in SPDY |
365 // serialized format, parse out a SpdyHeaderBlock, putting the results | 365 // serialized format, parse out a SpdyHeaderBlock, putting the results |
366 // in the given header block. | 366 // in the given header block. |
367 // Returns number of bytes consumed if successfully parsed, 0 otherwise. | 367 // Returns number of bytes consumed if successfully parsed, 0 otherwise. |
368 size_t ParseHeaderBlockInBuffer(const char* header_data, | 368 size_t ParseHeaderBlockInBuffer(const char* header_data, |
369 size_t header_length, | 369 size_t header_length, |
370 SpdyHeaderBlock* block) const; | 370 SpdyHeaderBlock* block) const; |
371 | 371 |
372 // Serialize a data frame. | 372 // Serialize a data frame. |
373 SpdySerializedFrame* SerializeData(const SpdyDataIR& data) const; | 373 SpdySerializedFrame* SerializeData(const SpdyDataIR& data) const; |
374 // Serializes just the data frame header, excluding actual data payload. | 374 // Serializes the data frame header and optionally padding length fields, |
375 SpdySerializedFrame* SerializeDataFrameHeader(const SpdyDataIR& data) const; | 375 // excluding actual data payload and padding. |
| 376 SpdySerializedFrame* SerializeDataFrameHeaderWithPaddingLengthField( |
| 377 const SpdyDataIR& data) const; |
376 | 378 |
377 // Serializes a SYN_STREAM frame. | 379 // Serializes a SYN_STREAM frame. |
378 SpdySerializedFrame* SerializeSynStream(const SpdySynStreamIR& syn_stream); | 380 SpdySerializedFrame* SerializeSynStream(const SpdySynStreamIR& syn_stream); |
379 | 381 |
380 // Serialize a SYN_REPLY SpdyFrame. | 382 // Serialize a SYN_REPLY SpdyFrame. |
381 SpdySerializedFrame* SerializeSynReply(const SpdySynReplyIR& syn_reply); | 383 SpdySerializedFrame* SerializeSynReply(const SpdySynReplyIR& syn_reply); |
382 | 384 |
383 SpdySerializedFrame* SerializeRstStream( | 385 SpdySerializedFrame* SerializeRstStream( |
384 const SpdyRstStreamIR& rst_stream) const; | 386 const SpdyRstStreamIR& rst_stream) const; |
385 | 387 |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 | 720 |
719 // Returns true if the given StringPiece contains any upper case | 721 // Returns true if the given StringPiece contains any upper case |
720 // characters. Assumes ASCII input. | 722 // characters. Assumes ASCII input. |
721 // Implemented here for cross-compatibility with Chromium. | 723 // Implemented here for cross-compatibility with Chromium. |
722 bool ContainsUpperASCII(base::StringPiece s) const; | 724 bool ContainsUpperASCII(base::StringPiece s) const; |
723 }; | 725 }; |
724 | 726 |
725 } // namespace net | 727 } // namespace net |
726 | 728 |
727 #endif // NET_SPDY_SPDY_FRAMER_H_ | 729 #endif // NET_SPDY_SPDY_FRAMER_H_ |
OLD | NEW |