| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // to handle queued promised streams right now. | 91 // to handle queued promised streams right now. |
| 92 void CloseStreamInner(QuicStreamId stream_id, bool locally_reset) override; | 92 void CloseStreamInner(QuicStreamId stream_id, bool locally_reset) override; |
| 93 // Override to return true for locally preserved server push stream. | 93 // Override to return true for locally preserved server push stream. |
| 94 void HandleFrameOnNonexistentOutgoingStream(QuicStreamId stream_id) override; | 94 void HandleFrameOnNonexistentOutgoingStream(QuicStreamId stream_id) override; |
| 95 // Override to handle reseting locally preserved streams. | 95 // Override to handle reseting locally preserved streams. |
| 96 void HandleRstOnValidNonexistentStream( | 96 void HandleRstOnValidNonexistentStream( |
| 97 const QuicRstStreamFrame& frame) override; | 97 const QuicRstStreamFrame& frame) override; |
| 98 | 98 |
| 99 // QuicServerSessionBaseMethod: | 99 // QuicServerSessionBaseMethod: |
| 100 QuicCryptoServerStreamBase* CreateQuicCryptoServerStream( | 100 QuicCryptoServerStreamBase* CreateQuicCryptoServerStream( |
| 101 const QuicCryptoServerConfig* crypto_config) override; | 101 const QuicCryptoServerConfig* crypto_config, |
| 102 QuicCompressedCertsCache* compressed_certs_cache) override; |
| 102 | 103 |
| 103 private: | 104 private: |
| 104 friend class test::QuicSimpleServerSessionPeer; | 105 friend class test::QuicSimpleServerSessionPeer; |
| 105 | 106 |
| 106 // Create a server push headers block by copying request's headers block. | 107 // Create a server push headers block by copying request's headers block. |
| 107 // But replace or add these pseudo-headers as they are specific to each | 108 // But replace or add these pseudo-headers as they are specific to each |
| 108 // request: | 109 // request: |
| 109 // :authority, :path, :method, :scheme, referer. | 110 // :authority, :path, :method, :scheme, referer. |
| 110 // Copying the rest headers ensures they are the same as the original | 111 // Copying the rest headers ensures they are the same as the original |
| 111 // request, especially cookies. | 112 // request, especially cookies. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // stream_id is always next_outgoing_stream_id_, and the last one is always | 145 // stream_id is always next_outgoing_stream_id_, and the last one is always |
| 145 // highest_promised_stream_id_. | 146 // highest_promised_stream_id_. |
| 146 std::deque<PromisedStreamInfo> promised_streams_; | 147 std::deque<PromisedStreamInfo> promised_streams_; |
| 147 | 148 |
| 148 DISALLOW_COPY_AND_ASSIGN(QuicSimpleServerSession); | 149 DISALLOW_COPY_AND_ASSIGN(QuicSimpleServerSession); |
| 149 }; | 150 }; |
| 150 | 151 |
| 151 } // namespace net | 152 } // namespace net |
| 152 | 153 |
| 153 #endif // NET_TOOLS_QUIC_QUIC_SERVER_SESSION_H_ | 154 #endif // NET_TOOLS_QUIC_QUIC_SERVER_SESSION_H_ |
| OLD | NEW |