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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 // |flags| is the flags to use with the data. | 373 // |flags| is the flags to use with the data. |
374 // To mark this frame as the last frame, enable CONTROL_FLAG_FIN. | 374 // To mark this frame as the last frame, enable CONTROL_FLAG_FIN. |
375 // |compressed| specifies whether the frame should be compressed. | 375 // |compressed| specifies whether the frame should be compressed. |
376 // |headers| is the header block to include in the frame. | 376 // |headers| is the header block to include in the frame. |
377 SpdyFrame* CreateSynReply(SpdyStreamId stream_id, | 377 SpdyFrame* CreateSynReply(SpdyStreamId stream_id, |
378 SpdyControlFlags flags, | 378 SpdyControlFlags flags, |
379 bool compressed, | 379 bool compressed, |
380 const SpdyHeaderBlock* headers); | 380 const SpdyHeaderBlock* headers); |
381 SpdySerializedFrame* SerializeSynReply(const SpdySynReplyIR& syn_reply); | 381 SpdySerializedFrame* SerializeSynReply(const SpdySynReplyIR& syn_reply); |
382 | 382 |
383 SpdyRstStreamControlFrame* CreateRstStream(SpdyStreamId stream_id, | 383 SpdyFrame* CreateRstStream(SpdyStreamId stream_id, |
384 SpdyRstStreamStatus status) const; | 384 SpdyRstStreamStatus status) const; |
385 SpdySerializedFrame* SerializeRstStream( | 385 SpdySerializedFrame* SerializeRstStream( |
386 const SpdyRstStreamIR& rst_stream) const; | 386 const SpdyRstStreamIR& rst_stream) const; |
387 | 387 |
388 // Creates an instance of SpdySettingsControlFrame. The SETTINGS frame is | 388 // Creates an instance of SpdySettingsControlFrame. The SETTINGS frame is |
389 // used to communicate name/value pairs relevant to the communication channel. | 389 // used to communicate name/value pairs relevant to the communication channel. |
390 SpdySettingsControlFrame* CreateSettings(const SettingsMap& values) const; | 390 SpdySettingsControlFrame* CreateSettings(const SettingsMap& values) const; |
391 SpdySerializedFrame* SerializeSettings(const SpdySettingsIR& settings) const; | 391 SpdySerializedFrame* SerializeSettings(const SpdySettingsIR& settings) const; |
392 | 392 |
393 // Creates and serializes a PING frame. The unique_id is used to | 393 // Creates and serializes a PING frame. The unique_id is used to |
394 // identify the ping request/response. | 394 // identify the ping request/response. |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 // starts with HTTP. If it does, we likely have an HTTP response. This | 664 // starts with HTTP. If it does, we likely have an HTTP response. This |
665 // isn't guaranteed though: we could have gotten a settings frame and then | 665 // isn't guaranteed though: we could have gotten a settings frame and then |
666 // corrupt data that just looks like HTTP, but deterministic checking requires | 666 // corrupt data that just looks like HTTP, but deterministic checking requires |
667 // a lot more state. | 667 // a lot more state. |
668 bool probable_http_response_; | 668 bool probable_http_response_; |
669 }; | 669 }; |
670 | 670 |
671 } // namespace net | 671 } // namespace net |
672 | 672 |
673 #endif // NET_SPDY_SPDY_FRAMER_H_ | 673 #endif // NET_SPDY_SPDY_FRAMER_H_ |
OLD | NEW |