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. | |
88 QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override; | 85 QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override; |
89 QuicSimpleServerStream* CreateOutgoingDynamicStream( | 86 QuicSimpleServerStream* CreateOutgoingDynamicStream( |
90 SpdyPriority priority) override; | 87 SpdyPriority priority) override; |
91 std::unique_ptr<QuicStream> CreateStream(QuicStreamId id) override; | |
92 | |
93 // Closing an outgoing stream can reduce open outgoing stream count, try | 88 // Closing an outgoing stream can reduce open outgoing stream count, try |
94 // to handle queued promised streams right now. | 89 // to handle queued promised streams right now. |
95 void CloseStreamInner(QuicStreamId stream_id, bool locally_reset) override; | 90 void CloseStreamInner(QuicStreamId stream_id, bool locally_reset) override; |
96 // Override to return true for locally preserved server push stream. | 91 // Override to return true for locally preserved server push stream. |
97 void HandleFrameOnNonexistentOutgoingStream(QuicStreamId stream_id) override; | 92 void HandleFrameOnNonexistentOutgoingStream(QuicStreamId stream_id) override; |
98 // Override to handle reseting locally preserved streams. | 93 // Override to handle reseting locally preserved streams. |
99 void HandleRstOnValidNonexistentStream( | 94 void HandleRstOnValidNonexistentStream( |
100 const QuicRstStreamFrame& frame) override; | 95 const QuicRstStreamFrame& frame) override; |
101 | 96 |
102 // QuicServerSessionBaseMethod: | 97 // QuicServerSessionBaseMethod: |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 std::deque<PromisedStreamInfo> promised_streams_; | 147 std::deque<PromisedStreamInfo> promised_streams_; |
153 | 148 |
154 QuicHttpResponseCache* response_cache_; // Not owned. | 149 QuicHttpResponseCache* response_cache_; // Not owned. |
155 | 150 |
156 DISALLOW_COPY_AND_ASSIGN(QuicSimpleServerSession); | 151 DISALLOW_COPY_AND_ASSIGN(QuicSimpleServerSession); |
157 }; | 152 }; |
158 | 153 |
159 } // namespace net | 154 } // namespace net |
160 | 155 |
161 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_SESSION_H_ | 156 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_SESSION_H_ |
OLD | NEW |