OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 void recv(HttpData* data); | 106 void recv(HttpData* data); |
107 void abort(HttpError err); | 107 void abort(HttpError err); |
108 | 108 |
109 HttpMode mode() const { return mode_; } | 109 HttpMode mode() const { return mode_; } |
110 | 110 |
111 void set_ignore_data(bool ignore) { ignore_data_ = ignore; } | 111 void set_ignore_data(bool ignore) { ignore_data_ = ignore; } |
112 bool ignore_data() const { return ignore_data_; } | 112 bool ignore_data() const { return ignore_data_; } |
113 | 113 |
114 // Obtaining this stream puts HttpBase into stream mode until the stream | 114 // Obtaining this stream puts HttpBase into stream mode until the stream |
115 // is closed. HttpBase can only expose one open stream interface at a time. | 115 // is closed. HttpBase can only expose one open stream interface at a time. |
116 // Further calls will return NULL. | 116 // Further calls will return null. |
117 StreamInterface* GetDocumentStream(); | 117 StreamInterface* GetDocumentStream(); |
118 | 118 |
119 protected: | 119 protected: |
120 // Do cleanup when the http stream closes (error may be 0 for a clean | 120 // Do cleanup when the http stream closes (error may be 0 for a clean |
121 // shutdown), and return the error code to signal. | 121 // shutdown), and return the error code to signal. |
122 HttpError HandleStreamClose(int error); | 122 HttpError HandleStreamClose(int error); |
123 | 123 |
124 // DoReceiveLoop acts as a data pump, pulling data from the http stream, | 124 // DoReceiveLoop acts as a data pump, pulling data from the http stream, |
125 // pushing it through the HttpParser, and then populating the HttpData object | 125 // pushing it through the HttpParser, and then populating the HttpData object |
126 // based on the callbacks from the parser. One of the most interesting | 126 // based on the callbacks from the parser. One of the most interesting |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 | 178 |
179 bool ignore_data_, chunk_data_; | 179 bool ignore_data_, chunk_data_; |
180 HttpData::const_iterator header_; | 180 HttpData::const_iterator header_; |
181 }; | 181 }; |
182 | 182 |
183 /////////////////////////////////////////////////////////////////////////////// | 183 /////////////////////////////////////////////////////////////////////////////// |
184 | 184 |
185 } // namespace rtc | 185 } // namespace rtc |
186 | 186 |
187 #endif // WEBRTC_BASE_HTTPBASE_H__ | 187 #endif // WEBRTC_BASE_HTTPBASE_H__ |
OLD | NEW |