OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_QUIC_QUIC_HEADERS_STREAM_H_ | 5 #ifndef NET_QUIC_QUIC_HEADERS_STREAM_H_ |
6 #define NET_QUIC_QUIC_HEADERS_STREAM_H_ | 6 #define NET_QUIC_QUIC_HEADERS_STREAM_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "net/base/net_export.h" | 10 #include "net/base/net_export.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 ~QuicHeadersStream() override; | 26 ~QuicHeadersStream() override; |
27 | 27 |
28 // Writes |headers| for |stream_id| in a SYN_STREAM or SYN_REPLY | 28 // Writes |headers| for |stream_id| in a SYN_STREAM or SYN_REPLY |
29 // frame to the peer. If |fin| is true, the fin flag will be set on | 29 // frame to the peer. If |fin| is true, the fin flag will be set on |
30 // the SPDY frame. Returns the size, in bytes, of the resulting | 30 // the SPDY frame. Returns the size, in bytes, of the resulting |
31 // SPDY frame. | 31 // SPDY frame. |
32 size_t WriteHeaders(QuicStreamId stream_id, | 32 size_t WriteHeaders(QuicStreamId stream_id, |
33 const SpdyHeaderBlock& headers, | 33 const SpdyHeaderBlock& headers, |
34 bool fin, | 34 bool fin, |
35 SpdyPriority priority, | 35 SpdyPriority priority, |
36 QuicAckListenerInterface* ack_notifier_delegate); | 36 QuicAckListenerInterface* ack_listener); |
| 37 |
| 38 // Write |headers| for |promised_stream_id| on |original_stream_id| in a |
| 39 // PUSH_PROMISE frame to peer. Return the size, in bytes, of the resulting |
| 40 // SPDY frame. |
| 41 size_t WritePushPromise(QuicStreamId original_stream_id, |
| 42 QuicStreamId promised_stream_id, |
| 43 const SpdyHeaderBlock& headers, |
| 44 QuicAckListenerInterface* ack_listener); |
37 | 45 |
38 // ReliableQuicStream implementation | 46 // ReliableQuicStream implementation |
39 void OnDataAvailable() override; | 47 void OnDataAvailable() override; |
40 SpdyPriority Priority() const override; | 48 SpdyPriority Priority() const override; |
41 | 49 |
42 private: | 50 private: |
43 class SpdyFramerVisitor; | 51 class SpdyFramerVisitor; |
44 | 52 |
45 // The following methods are called by the SimpleVisitor. | 53 // The following methods are called by the SimpleVisitor. |
46 | 54 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 97 |
90 SpdyFramer spdy_framer_; | 98 SpdyFramer spdy_framer_; |
91 scoped_ptr<SpdyFramerVisitor> spdy_framer_visitor_; | 99 scoped_ptr<SpdyFramerVisitor> spdy_framer_visitor_; |
92 | 100 |
93 DISALLOW_COPY_AND_ASSIGN(QuicHeadersStream); | 101 DISALLOW_COPY_AND_ASSIGN(QuicHeadersStream); |
94 }; | 102 }; |
95 | 103 |
96 } // namespace net | 104 } // namespace net |
97 | 105 |
98 #endif // NET_QUIC_QUIC_HEADERS_STREAM_H_ | 106 #endif // NET_QUIC_QUIC_HEADERS_STREAM_H_ |
OLD | NEW |