| 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_SPDY_SERVER_STREAM_H_ | 5 #ifndef NET_TOOLS_QUIC_QUIC_SPDY_SERVER_STREAM_H_ |
| 6 #define NET_TOOLS_QUIC_QUIC_SPDY_SERVER_STREAM_H_ | 6 #define NET_TOOLS_QUIC_QUIC_SPDY_SERVER_STREAM_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "net/quic/quic_data_stream.h" | |
| 12 #include "net/quic/quic_protocol.h" | 11 #include "net/quic/quic_protocol.h" |
| 12 #include "net/quic/quic_spdy_stream.h" |
| 13 #include "net/spdy/spdy_framer.h" | 13 #include "net/spdy/spdy_framer.h" |
| 14 | 14 |
| 15 namespace net { | 15 namespace net { |
| 16 | 16 |
| 17 class QuicSpdySession; | 17 class QuicSpdySession; |
| 18 | 18 |
| 19 namespace tools { | 19 namespace tools { |
| 20 | 20 |
| 21 namespace test { | 21 namespace test { |
| 22 class QuicSpdyServerStreamPeer; | 22 class QuicSpdyServerStreamPeer; |
| 23 } // namespace test | 23 } // namespace test |
| 24 | 24 |
| 25 // All this does right now is aggregate data, and on fin, send an HTTP | 25 // All this does right now is aggregate data, and on fin, send an HTTP |
| 26 // response. | 26 // response. |
| 27 class QuicSpdyServerStream : public QuicDataStream { | 27 class QuicSpdyServerStream : public QuicSpdyStream { |
| 28 public: | 28 public: |
| 29 QuicSpdyServerStream(QuicStreamId id, QuicSpdySession* session); | 29 QuicSpdyServerStream(QuicStreamId id, QuicSpdySession* session); |
| 30 ~QuicSpdyServerStream() override; | 30 ~QuicSpdyServerStream() override; |
| 31 | 31 |
| 32 // QuicDataStream | 32 // QuicSpdyStream |
| 33 void OnStreamHeadersComplete(bool fin, size_t frame_len) override; | 33 void OnStreamHeadersComplete(bool fin, size_t frame_len) override; |
| 34 | 34 |
| 35 // ReliableQuicStream implementation called by the sequencer when there is | 35 // ReliableQuicStream implementation called by the sequencer when there is |
| 36 // data (or a FIN) to be read. | 36 // data (or a FIN) to be read. |
| 37 void OnDataAvailable() override; | 37 void OnDataAvailable() override; |
| 38 | 38 |
| 39 // The response body of error responses. | 39 // The response body of error responses. |
| 40 static const char* const kErrorResponseBody; | 40 static const char* const kErrorResponseBody; |
| 41 | 41 |
| 42 protected: | 42 protected: |
| (...skipping 24 matching lines...) Expand all Loading... |
| 67 int content_length_; | 67 int content_length_; |
| 68 std::string body_; | 68 std::string body_; |
| 69 | 69 |
| 70 DISALLOW_COPY_AND_ASSIGN(QuicSpdyServerStream); | 70 DISALLOW_COPY_AND_ASSIGN(QuicSpdyServerStream); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 } // namespace tools | 73 } // namespace tools |
| 74 } // namespace net | 74 } // namespace net |
| 75 | 75 |
| 76 #endif // NET_TOOLS_QUIC_QUIC_SPDY_SERVER_STREAM_H_ | 76 #endif // NET_TOOLS_QUIC_QUIC_SPDY_SERVER_STREAM_H_ |
| OLD | NEW |