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 |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 // Override the base class to store the size of the headers. | 34 // Override the base class to store the size of the headers. |
35 void OnStreamHeadersComplete(bool fin, size_t frame_len) override; | 35 void OnStreamHeadersComplete(bool fin, size_t frame_len) override; |
36 | 36 |
37 // ReliableQuicStream implementation called by the session when there's | 37 // ReliableQuicStream implementation called by the session when there's |
38 // data for us. | 38 // data for us. |
39 uint32 ProcessData(const char* data, uint32 data_len) override; | 39 uint32 ProcessData(const char* data, uint32 data_len) override; |
40 | 40 |
41 // Serializes the headers and body, sends it to the server, and | 41 // Serializes the headers and body, sends it to the server, and |
42 // returns the number of bytes sent. | 42 // returns the number of bytes sent. |
43 ssize_t SendRequest(const SpdyHeaderBlock& headers, | 43 size_t SendRequest(const SpdyHeaderBlock& headers, |
44 base::StringPiece body, | 44 base::StringPiece body, |
45 bool fin); | 45 bool fin); |
46 | 46 |
47 // Sends body data to the server, or buffers if it can't be sent immediately. | 47 // Sends body data to the server, or buffers if it can't be sent immediately. |
48 void SendBody(const std::string& data, bool fin); | 48 void SendBody(const std::string& data, bool fin); |
49 // As above, but |delegate| will be notified once |data| is ACKed. | 49 // As above, but |delegate| will be notified once |data| is ACKed. |
50 void SendBody(const std::string& data, | 50 void SendBody(const std::string& data, |
51 bool fin, | 51 bool fin, |
52 QuicAckNotifier::DelegateInterface* delegate); | 52 QuicAckNotifier::DelegateInterface* delegate); |
53 | 53 |
54 // Returns the response data. | 54 // Returns the response data. |
55 const std::string& data() { return data_; } | 55 const std::string& data() { return data_; } |
(...skipping 23 matching lines...) Expand all Loading... |
79 size_t header_bytes_read_; | 79 size_t header_bytes_read_; |
80 size_t header_bytes_written_; | 80 size_t header_bytes_written_; |
81 | 81 |
82 DISALLOW_COPY_AND_ASSIGN(QuicSpdyClientStream); | 82 DISALLOW_COPY_AND_ASSIGN(QuicSpdyClientStream); |
83 }; | 83 }; |
84 | 84 |
85 } // namespace tools | 85 } // namespace tools |
86 } // namespace net | 86 } // namespace net |
87 | 87 |
88 #endif // NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ | 88 #endif // NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ |
OLD | NEW |