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 // A toy server specific QuicSession subclass. | 5 // A toy server specific QuicSession subclass. |
6 | 6 |
7 #ifndef NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_SESSION_H_ | 7 #ifndef NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_SESSION_H_ |
8 #define NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_SESSION_H_ | 8 #define NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_SESSION_H_ |
9 | 9 |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // And enqueue HEADERS block in those PUSH_PROMISED for sending push response | 75 // And enqueue HEADERS block in those PUSH_PROMISED for sending push response |
76 // later. | 76 // later. |
77 virtual void PromisePushResources( | 77 virtual void PromisePushResources( |
78 const std::string& request_url, | 78 const std::string& request_url, |
79 const std::list<QuicHttpResponseCache::ServerPushInfo>& resources, | 79 const std::list<QuicHttpResponseCache::ServerPushInfo>& resources, |
80 QuicStreamId original_stream_id, | 80 QuicStreamId original_stream_id, |
81 const SpdyHeaderBlock& original_request_headers); | 81 const SpdyHeaderBlock& original_request_headers); |
82 | 82 |
83 protected: | 83 protected: |
84 // QuicSession methods: | 84 // QuicSession methods: |
| 85 // TODO(ckrasic) - remove these two when |
| 86 // FLAGS_quic_reloadable_flag_quic_refactor_stream_creation is |
| 87 // deprecated. |
85 QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override; | 88 QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override; |
86 QuicSimpleServerStream* CreateOutgoingDynamicStream( | 89 QuicSimpleServerStream* CreateOutgoingDynamicStream( |
87 SpdyPriority priority) override; | 90 SpdyPriority priority) override; |
| 91 std::unique_ptr<QuicStream> CreateStream(QuicStreamId id) override; |
| 92 |
88 // Closing an outgoing stream can reduce open outgoing stream count, try | 93 // Closing an outgoing stream can reduce open outgoing stream count, try |
89 // to handle queued promised streams right now. | 94 // to handle queued promised streams right now. |
90 void CloseStreamInner(QuicStreamId stream_id, bool locally_reset) override; | 95 void CloseStreamInner(QuicStreamId stream_id, bool locally_reset) override; |
91 // Override to return true for locally preserved server push stream. | 96 // Override to return true for locally preserved server push stream. |
92 void HandleFrameOnNonexistentOutgoingStream(QuicStreamId stream_id) override; | 97 void HandleFrameOnNonexistentOutgoingStream(QuicStreamId stream_id) override; |
93 // Override to handle reseting locally preserved streams. | 98 // Override to handle reseting locally preserved streams. |
94 void HandleRstOnValidNonexistentStream( | 99 void HandleRstOnValidNonexistentStream( |
95 const QuicRstStreamFrame& frame) override; | 100 const QuicRstStreamFrame& frame) override; |
96 | 101 |
97 // QuicServerSessionBaseMethod: | 102 // QuicServerSessionBaseMethod: |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 std::deque<PromisedStreamInfo> promised_streams_; | 152 std::deque<PromisedStreamInfo> promised_streams_; |
148 | 153 |
149 QuicHttpResponseCache* response_cache_; // Not owned. | 154 QuicHttpResponseCache* response_cache_; // Not owned. |
150 | 155 |
151 DISALLOW_COPY_AND_ASSIGN(QuicSimpleServerSession); | 156 DISALLOW_COPY_AND_ASSIGN(QuicSimpleServerSession); |
152 }; | 157 }; |
153 | 158 |
154 } // namespace net | 159 } // namespace net |
155 | 160 |
156 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_SESSION_H_ | 161 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_SESSION_H_ |
OLD | NEW |