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 |
11 #include <algorithm> | 11 #include <algorithm> |
12 | 12 |
13 #include "webrtc/base/httpcommon-inl.h" | 13 #include "webrtc/base/httpcommon-inl.h" |
14 | 14 |
15 #include "webrtc/base/asyncsocket.h" | 15 #include "webrtc/base/asyncsocket.h" |
16 #include "webrtc/base/checks.h" | 16 #include "webrtc/base/checks.h" |
17 #include "webrtc/base/common.h" | |
18 #include "webrtc/base/httpserver.h" | 17 #include "webrtc/base/httpserver.h" |
19 #include "webrtc/base/logging.h" | 18 #include "webrtc/base/logging.h" |
20 #include "webrtc/base/socketstream.h" | 19 #include "webrtc/base/socketstream.h" |
21 #include "webrtc/base/thread.h" | 20 #include "webrtc/base/thread.h" |
22 | 21 |
23 namespace rtc { | 22 namespace rtc { |
24 | 23 |
25 /////////////////////////////////////////////////////////////////////////////// | 24 /////////////////////////////////////////////////////////////////////////////// |
26 // HttpServer | 25 // HttpServer |
27 /////////////////////////////////////////////////////////////////////////////// | 26 /////////////////////////////////////////////////////////////////////////////// |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 current_->request.clear(true); | 215 current_->request.clear(true); |
217 current_->response.clear(true); | 216 current_->response.clear(true); |
218 base_.recv(¤t_->request); | 217 base_.recv(¤t_->request); |
219 } else { | 218 } else { |
220 RTC_NOTREACHED(); | 219 RTC_NOTREACHED(); |
221 } | 220 } |
222 } | 221 } |
223 | 222 |
224 void | 223 void |
225 HttpServer::Connection::onHttpClosed(HttpError err) { | 224 HttpServer::Connection::onHttpClosed(HttpError err) { |
226 RTC_UNUSED(err); | |
227 server_->Remove(connection_id_); | 225 server_->Remove(connection_id_); |
228 } | 226 } |
229 | 227 |
230 /////////////////////////////////////////////////////////////////////////////// | 228 /////////////////////////////////////////////////////////////////////////////// |
231 // HttpListenServer | 229 // HttpListenServer |
232 /////////////////////////////////////////////////////////////////////////////// | 230 /////////////////////////////////////////////////////////////////////////////// |
233 | 231 |
234 HttpListenServer::HttpListenServer() { | 232 HttpListenServer::HttpListenServer() { |
235 SignalConnectionClosed.connect(this, &HttpListenServer::OnConnectionClosed); | 233 SignalConnectionClosed.connect(this, &HttpListenServer::OnConnectionClosed); |
236 } | 234 } |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 | 277 |
280 void HttpListenServer::OnConnectionClosed(HttpServer* server, | 278 void HttpListenServer::OnConnectionClosed(HttpServer* server, |
281 int connection_id, | 279 int connection_id, |
282 StreamInterface* stream) { | 280 StreamInterface* stream) { |
283 Thread::Current()->Dispose(stream); | 281 Thread::Current()->Dispose(stream); |
284 } | 282 } |
285 | 283 |
286 /////////////////////////////////////////////////////////////////////////////// | 284 /////////////////////////////////////////////////////////////////////////////// |
287 | 285 |
288 } // namespace rtc | 286 } // namespace rtc |
OLD | NEW |