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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 SpdySerializedFrame* SerializeWindowUpdate( | 433 SpdySerializedFrame* SerializeWindowUpdate( |
434 const SpdyWindowUpdateIR& window_update) const; | 434 const SpdyWindowUpdateIR& window_update) const; |
435 | 435 |
436 // Creates and serializes a CREDENTIAL frame. The CREDENTIAL | 436 // Creates and serializes a CREDENTIAL frame. The CREDENTIAL |
437 // frame is used to send a client certificate to the server when | 437 // frame is used to send a client certificate to the server when |
438 // request more than one origin are sent over the same SPDY session. | 438 // request more than one origin are sent over the same SPDY session. |
439 SpdyFrame* CreateCredentialFrame(const SpdyCredential& credential) const; | 439 SpdyFrame* CreateCredentialFrame(const SpdyCredential& credential) const; |
440 SpdySerializedFrame* SerializeCredential( | 440 SpdySerializedFrame* SerializeCredential( |
441 const SpdyCredentialIR& credential) const; | 441 const SpdyCredentialIR& credential) const; |
442 | 442 |
443 // Serializes a BLOCKED frame. The BLOCKED frame is used to indicate to the | 443 // Creates and serializes a BLOCKED frame. The BLOCKED frame is used to |
444 // remote endpoint that this endpoint believes itself to be flow-control | 444 // indicate to the remote endpoint that this endpoint believes itself to be |
445 // blocked but otherwise ready to send data. The BLOCKED frame is purely | 445 // flow-control blocked but otherwise ready to send data. The BLOCKED frame |
446 // advisory and optional. | 446 // is purely advisory and optional. |
| 447 SpdyFrame* CreateBlocked(SpdyStreamId stream_id); |
447 SpdySerializedFrame* SerializeBlocked(const SpdyBlockedIR& blocked) const; | 448 SpdySerializedFrame* SerializeBlocked(const SpdyBlockedIR& blocked) const; |
448 | 449 |
449 // Creates and serializes a PUSH_PROMISE frame. The PUSH_PROMISE frame is used | 450 // Creates and serializes a PUSH_PROMISE frame. The PUSH_PROMISE frame is used |
450 // to inform the client that it will be receiving an additional stream | 451 // to inform the client that it will be receiving an additional stream |
451 // in response to the original request. The frame includes synthesized | 452 // in response to the original request. The frame includes synthesized |
452 // headers to explain the upcoming data. | 453 // headers to explain the upcoming data. |
453 SpdyFrame* CreatePushPromise(SpdyStreamId stream_id, | 454 SpdyFrame* CreatePushPromise(SpdyStreamId stream_id, |
454 SpdyStreamId promised_stream_id, | 455 SpdyStreamId promised_stream_id, |
455 const SpdyHeaderBlock* headers); | 456 const SpdyHeaderBlock* headers); |
456 SpdySerializedFrame* SerializePushPromise( | 457 SpdySerializedFrame* SerializePushPromise( |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 // starts with HTTP. If it does, we likely have an HTTP response. This | 705 // starts with HTTP. If it does, we likely have an HTTP response. This |
705 // isn't guaranteed though: we could have gotten a settings frame and then | 706 // isn't guaranteed though: we could have gotten a settings frame and then |
706 // corrupt data that just looks like HTTP, but deterministic checking requires | 707 // corrupt data that just looks like HTTP, but deterministic checking requires |
707 // a lot more state. | 708 // a lot more state. |
708 bool probable_http_response_; | 709 bool probable_http_response_; |
709 }; | 710 }; |
710 | 711 |
711 } // namespace net | 712 } // namespace net |
712 | 713 |
713 #endif // NET_SPDY_SPDY_FRAMER_H_ | 714 #endif // NET_SPDY_SPDY_FRAMER_H_ |
OLD | NEW |