| 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 #ifndef NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_STREAM_H_ | 5 #ifndef NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_STREAM_H_ |
| 6 #define NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_STREAM_H_ | 6 #define NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_STREAM_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 ~QuicSimpleServerStream() override; | 29 ~QuicSimpleServerStream() override; |
| 30 | 30 |
| 31 // QuicSpdyStream | 31 // QuicSpdyStream |
| 32 void OnInitialHeadersComplete(bool fin, | 32 void OnInitialHeadersComplete(bool fin, |
| 33 size_t frame_len, | 33 size_t frame_len, |
| 34 const QuicHeaderList& header_list) override; | 34 const QuicHeaderList& header_list) override; |
| 35 void OnTrailingHeadersComplete(bool fin, | 35 void OnTrailingHeadersComplete(bool fin, |
| 36 size_t frame_len, | 36 size_t frame_len, |
| 37 const QuicHeaderList& header_list) override; | 37 const QuicHeaderList& header_list) override; |
| 38 | 38 |
| 39 // ReliableQuicStream implementation called by the sequencer when there is | 39 // QuicStream implementation called by the sequencer when there is |
| 40 // data (or a FIN) to be read. | 40 // data (or a FIN) to be read. |
| 41 void OnDataAvailable() override; | 41 void OnDataAvailable() override; |
| 42 | 42 |
| 43 // Make this stream start from as if it just finished parsing an incoming | 43 // Make this stream start from as if it just finished parsing an incoming |
| 44 // request whose headers are equivalent to |push_request_headers|. | 44 // request whose headers are equivalent to |push_request_headers|. |
| 45 // Doing so will trigger this toy stream to fetch response and send it back. | 45 // Doing so will trigger this toy stream to fetch response and send it back. |
| 46 virtual void PushResponse(SpdyHeaderBlock push_request_headers); | 46 virtual void PushResponse(SpdyHeaderBlock push_request_headers); |
| 47 | 47 |
| 48 // The response body of error responses. | 48 // The response body of error responses. |
| 49 static const char* const kErrorResponseBody; | 49 static const char* const kErrorResponseBody; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 79 SpdyHeaderBlock request_headers_; | 79 SpdyHeaderBlock request_headers_; |
| 80 int64_t content_length_; | 80 int64_t content_length_; |
| 81 std::string body_; | 81 std::string body_; |
| 82 | 82 |
| 83 DISALLOW_COPY_AND_ASSIGN(QuicSimpleServerStream); | 83 DISALLOW_COPY_AND_ASSIGN(QuicSimpleServerStream); |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 } // namespace net | 86 } // namespace net |
| 87 | 87 |
| 88 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_STREAM_H_ | 88 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_STREAM_H_ |
| OLD | NEW |