| 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_CLIENT_STREAM_H_ | 5 #ifndef NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ |
| 6 #define NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ | 6 #define NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ |
| 7 | 7 |
| 8 #include <sys/types.h> | 8 #include <sys/types.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/strings/string_piece.h" | 11 #include "base/strings/string_piece.h" |
| 12 #include "net/base/io_buffer.h" | 12 #include "net/base/io_buffer.h" |
| 13 #include "net/quic/quic_data_stream.h" | 13 #include "net/quic/quic_data_stream.h" |
| 14 #include "net/quic/quic_protocol.h" | 14 #include "net/quic/quic_protocol.h" |
| 15 #include "net/tools/balsa/balsa_frame.h" | 15 #include "net/tools/balsa/balsa_frame.h" |
| 16 #include "net/tools/balsa/balsa_headers.h" | 16 #include "net/tools/balsa/balsa_headers.h" |
| 17 | 17 |
| 18 namespace net { | 18 namespace net { |
| 19 | 19 |
| 20 namespace tools { | 20 namespace tools { |
| 21 | 21 |
| 22 class QuicClientSession; | 22 class QuicClientSession; |
| 23 | 23 |
| 24 // All this does right now is send an SPDY request, and aggregate the | 24 // All this does right now is send an SPDY request, and aggregate the |
| 25 // SPDY response. | 25 // SPDY response. |
| 26 class QuicSpdyClientStream : public QuicDataStream { | 26 class QuicSpdyClientStream : public QuicDataStream { |
| 27 public: | 27 public: |
| 28 QuicSpdyClientStream(QuicStreamId id, QuicClientSession* session); | 28 QuicSpdyClientStream(QuicStreamId id, QuicClientSession* session); |
| 29 virtual ~QuicSpdyClientStream(); | 29 virtual ~QuicSpdyClientStream() OVERRIDE; |
| 30 | 30 |
| 31 // Override the base class to close the write side as soon as we get a | 31 // Override the base class to close the write side as soon as we get a |
| 32 // response. | 32 // response. |
| 33 // SPDY/HTTP does not support bidirectional streaming. | 33 // SPDY/HTTP does not support bidirectional streaming. |
| 34 virtual bool OnStreamFrame(const QuicStreamFrame& frame) OVERRIDE; | 34 virtual bool OnStreamFrame(const QuicStreamFrame& frame) OVERRIDE; |
| 35 | 35 |
| 36 // Override the base class to store the size of the headers. | 36 // Override the base class to store the size of the headers. |
| 37 virtual void OnStreamHeadersComplete(bool fin, size_t frame_len) OVERRIDE; | 37 virtual void OnStreamHeadersComplete(bool fin, size_t frame_len) OVERRIDE; |
| 38 | 38 |
| 39 // ReliableQuicStream implementation called by the session when there's | 39 // ReliableQuicStream implementation called by the session when there's |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 scoped_refptr<GrowableIOBuffer> read_buf_; | 74 scoped_refptr<GrowableIOBuffer> read_buf_; |
| 75 bool response_headers_received_; | 75 bool response_headers_received_; |
| 76 size_t header_bytes_read_; | 76 size_t header_bytes_read_; |
| 77 size_t header_bytes_written_; | 77 size_t header_bytes_written_; |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 } // namespace tools | 80 } // namespace tools |
| 81 } // namespace net | 81 } // namespace net |
| 82 | 82 |
| 83 #endif // NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ | 83 #endif // NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ |
| OLD | NEW |