OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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_SPDY_SESSION_H_ | 5 #ifndef NET_QUIC_QUIC_SPDY_SESSION_H_ |
6 #define NET_QUIC_QUIC_SPDY_SESSION_H_ | 6 #define NET_QUIC_QUIC_SPDY_SESSION_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 14 matching lines...) Expand all Loading... |
25 // A QUIC session with a headers stream. | 25 // A QUIC session with a headers stream. |
26 class NET_EXPORT_PRIVATE QuicSpdySession : public QuicSession { | 26 class NET_EXPORT_PRIVATE QuicSpdySession : public QuicSession { |
27 public: | 27 public: |
28 // Does not take ownership of |connection|. | 28 // Does not take ownership of |connection|. |
29 QuicSpdySession(QuicConnection* connection, const QuicConfig& config); | 29 QuicSpdySession(QuicConnection* connection, const QuicConfig& config); |
30 | 30 |
31 ~QuicSpdySession() override; | 31 ~QuicSpdySession() override; |
32 | 32 |
33 void Initialize() override; | 33 void Initialize() override; |
34 | 34 |
35 // Called by |headers_stream_| when headers have been received for a stream. | |
36 virtual void OnStreamHeaders(QuicStreamId stream_id, | |
37 base::StringPiece headers_data); | |
38 // Called by |headers_stream_| when headers with a priority have been | 35 // Called by |headers_stream_| when headers with a priority have been |
39 // received for this stream. This method will only be called for server | 36 // received for this stream. This method will only be called for server |
40 // streams. | 37 // streams. |
41 virtual void OnStreamHeadersPriority(QuicStreamId stream_id, | 38 virtual void OnStreamHeadersPriority(QuicStreamId stream_id, |
42 SpdyPriority priority); | 39 SpdyPriority priority); |
43 // Called by |headers_stream_| when headers have been completely received | |
44 // for a stream. |fin| will be true if the fin flag was set in the headers | |
45 // frame. | |
46 virtual void OnStreamHeadersComplete(QuicStreamId stream_id, | |
47 bool fin, | |
48 size_t frame_len); | |
49 | 40 |
50 // Called by |headers_stream_| when headers have been completely received | 41 // Called by |headers_stream_| when headers have been completely received |
51 // for a stream. |fin| will be true if the fin flag was set in the headers | 42 // for a stream. |fin| will be true if the fin flag was set in the headers |
52 // frame. | 43 // frame. |
53 virtual void OnStreamHeaderList(QuicStreamId stream_id, | 44 virtual void OnStreamHeaderList(QuicStreamId stream_id, |
54 bool fin, | 45 bool fin, |
55 size_t frame_len, | 46 size_t frame_len, |
56 const QuicHeaderList& header_list); | 47 const QuicHeaderList& header_list); |
57 | 48 |
58 // Called by |headers_stream_| when push promise headers have been | 49 // Called by |headers_stream_| when push promise headers have been |
59 // received for a stream. | |
60 virtual void OnPromiseHeaders(QuicStreamId stream_id, | |
61 base::StringPiece headers_data); | |
62 | |
63 // Called by |headers_stream_| when push promise headers have been | |
64 // completely received. |fin| will be true if the fin flag was set | |
65 // in the headers. | |
66 virtual void OnPromiseHeadersComplete(QuicStreamId stream_id, | |
67 QuicStreamId promised_stream_id, | |
68 size_t frame_len); | |
69 | |
70 // Called by |headers_stream_| when push promise headers have been | |
71 // completely received. |fin| will be true if the fin flag was set | 50 // completely received. |fin| will be true if the fin flag was set |
72 // in the headers. | 51 // in the headers. |
73 virtual void OnPromiseHeaderList(QuicStreamId stream_id, | 52 virtual void OnPromiseHeaderList(QuicStreamId stream_id, |
74 QuicStreamId promised_stream_id, | 53 QuicStreamId promised_stream_id, |
75 size_t frame_len, | 54 size_t frame_len, |
76 const QuicHeaderList& header_list); | 55 const QuicHeaderList& header_list); |
77 | 56 |
78 // Writes |headers| for the stream |id| to the dedicated headers stream. | 57 // Writes |headers| for the stream |id| to the dedicated headers stream. |
79 // If |fin| is true, then no more data will be sent for the stream |id|. | 58 // If |fin| is true, then no more data will be sent for the stream |id|. |
80 // If provided, |ack_notifier_delegate| will be registered to be notified when | 59 // If provided, |ack_notifier_delegate| will be registered to be notified when |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 // Set during handshake. If true, resources in x-associated-content and link | 128 // Set during handshake. If true, resources in x-associated-content and link |
150 // headers will be pushed. | 129 // headers will be pushed. |
151 bool server_push_enabled_; | 130 bool server_push_enabled_; |
152 | 131 |
153 DISALLOW_COPY_AND_ASSIGN(QuicSpdySession); | 132 DISALLOW_COPY_AND_ASSIGN(QuicSpdySession); |
154 }; | 133 }; |
155 | 134 |
156 } // namespace net | 135 } // namespace net |
157 | 136 |
158 #endif // NET_QUIC_QUIC_SPDY_SESSION_H_ | 137 #endif // NET_QUIC_QUIC_SPDY_SESSION_H_ |
OLD | NEW |