| 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" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 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 QuicDataStream { |
| 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 // QuicDataStream |
| 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 session when there's | 35 // ReliableQuicStream implementation called by the sequencer when there is |
| 36 // data for us. | 36 // data (or a FIN) to be read. |
| 37 void OnDataAvailable() override; | 37 void OnDataAvailable() override; |
| 38 void OnFinRead() override; | |
| 39 | 38 |
| 40 protected: | 39 protected: |
| 41 // Sends a basic 200 response using SendHeaders for the headers and WriteData | 40 // Sends a basic 200 response using SendHeaders for the headers and WriteData |
| 42 // for the body. | 41 // for the body. |
| 43 virtual void SendResponse(); | 42 virtual void SendResponse(); |
| 44 | 43 |
| 45 void SendHeadersAndBody(const SpdyHeaderBlock& response_headers, | 44 void SendHeadersAndBody(const SpdyHeaderBlock& response_headers, |
| 46 base::StringPiece body); | 45 base::StringPiece body); |
| 47 | 46 |
| 48 SpdyHeaderBlock* request_headers() { return &request_headers_; } | 47 SpdyHeaderBlock* request_headers() { return &request_headers_; } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 68 int content_length_; | 67 int content_length_; |
| 69 std::string body_; | 68 std::string body_; |
| 70 | 69 |
| 71 DISALLOW_COPY_AND_ASSIGN(QuicSpdyServerStream); | 70 DISALLOW_COPY_AND_ASSIGN(QuicSpdyServerStream); |
| 72 }; | 71 }; |
| 73 | 72 |
| 74 } // namespace tools | 73 } // namespace tools |
| 75 } // namespace net | 74 } // namespace net |
| 76 | 75 |
| 77 #endif // NET_TOOLS_QUIC_QUIC_SPDY_SERVER_STREAM_H_ | 76 #endif // NET_TOOLS_QUIC_QUIC_SPDY_SERVER_STREAM_H_ |
| OLD | NEW |