| 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 #ifndef WEBRTC_BASE_HTTPSERVER_H__ | 11 #ifndef WEBRTC_BASE_HTTPSERVER_H__ |
| 12 #define WEBRTC_BASE_HTTPSERVER_H__ | 12 #define WEBRTC_BASE_HTTPSERVER_H__ |
| 13 | 13 |
| 14 #include <map> | 14 #include <map> |
| 15 #include <memory> |
| 16 |
| 15 #include "webrtc/base/httpbase.h" | 17 #include "webrtc/base/httpbase.h" |
| 16 | 18 |
| 17 namespace rtc { | 19 namespace rtc { |
| 18 | 20 |
| 19 class AsyncSocket; | 21 class AsyncSocket; |
| 20 class HttpServer; | 22 class HttpServer; |
| 21 class SocketAddress; | 23 class SocketAddress; |
| 22 | 24 |
| 23 ////////////////////////////////////////////////////////////////////// | 25 ////////////////////////////////////////////////////////////////////// |
| 24 // HttpServer | 26 // HttpServer |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 122 |
| 121 int Listen(const SocketAddress& address); | 123 int Listen(const SocketAddress& address); |
| 122 bool GetAddress(SocketAddress* address) const; | 124 bool GetAddress(SocketAddress* address) const; |
| 123 void StopListening(); | 125 void StopListening(); |
| 124 | 126 |
| 125 private: | 127 private: |
| 126 void OnReadEvent(AsyncSocket* socket); | 128 void OnReadEvent(AsyncSocket* socket); |
| 127 void OnConnectionClosed(HttpServer* server, int connection_id, | 129 void OnConnectionClosed(HttpServer* server, int connection_id, |
| 128 StreamInterface* stream); | 130 StreamInterface* stream); |
| 129 | 131 |
| 130 scoped_ptr<AsyncSocket> listener_; | 132 std::unique_ptr<AsyncSocket> listener_; |
| 131 }; | 133 }; |
| 132 | 134 |
| 133 ////////////////////////////////////////////////////////////////////// | 135 ////////////////////////////////////////////////////////////////////// |
| 134 | 136 |
| 135 } // namespace rtc | 137 } // namespace rtc |
| 136 | 138 |
| 137 #endif // WEBRTC_BASE_HTTPSERVER_H__ | 139 #endif // WEBRTC_BASE_HTTPSERVER_H__ |
| OLD | NEW |