| 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_PHYSICALSOCKETSERVER_H__ | 11 #ifndef WEBRTC_BASE_PHYSICALSOCKETSERVER_H__ |
| 12 #define WEBRTC_BASE_PHYSICALSOCKETSERVER_H__ | 12 #define WEBRTC_BASE_PHYSICALSOCKETSERVER_H__ |
| 13 | 13 |
| 14 #include <memory> |
| 14 #include <vector> | 15 #include <vector> |
| 15 | 16 |
| 16 #include "webrtc/base/asyncfile.h" | 17 #include "webrtc/base/asyncfile.h" |
| 17 #include "webrtc/base/nethelpers.h" | 18 #include "webrtc/base/nethelpers.h" |
| 18 #include "webrtc/base/scoped_ptr.h" | |
| 19 #include "webrtc/base/socketserver.h" | 19 #include "webrtc/base/socketserver.h" |
| 20 #include "webrtc/base/criticalsection.h" | 20 #include "webrtc/base/criticalsection.h" |
| 21 | 21 |
| 22 #if defined(WEBRTC_POSIX) | 22 #if defined(WEBRTC_POSIX) |
| 23 typedef int SOCKET; | 23 typedef int SOCKET; |
| 24 #endif // WEBRTC_POSIX | 24 #endif // WEBRTC_POSIX |
| 25 | 25 |
| 26 namespace rtc { | 26 namespace rtc { |
| 27 | 27 |
| 28 // Event constants for the Dispatcher class. | 28 // Event constants for the Dispatcher class. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 Dispatcher* signal_dispatcher(); | 97 Dispatcher* signal_dispatcher(); |
| 98 #endif | 98 #endif |
| 99 | 99 |
| 100 private: | 100 private: |
| 101 typedef std::vector<Dispatcher*> DispatcherList; | 101 typedef std::vector<Dispatcher*> DispatcherList; |
| 102 typedef std::vector<size_t*> IteratorList; | 102 typedef std::vector<size_t*> IteratorList; |
| 103 | 103 |
| 104 #if defined(WEBRTC_POSIX) | 104 #if defined(WEBRTC_POSIX) |
| 105 static bool InstallSignal(int signum, void (*handler)(int)); | 105 static bool InstallSignal(int signum, void (*handler)(int)); |
| 106 | 106 |
| 107 scoped_ptr<PosixSignalDispatcher> signal_dispatcher_; | 107 std::unique_ptr<PosixSignalDispatcher> signal_dispatcher_; |
| 108 #endif | 108 #endif |
| 109 DispatcherList dispatchers_; | 109 DispatcherList dispatchers_; |
| 110 IteratorList iterators_; | 110 IteratorList iterators_; |
| 111 Signaler* signal_wakeup_; | 111 Signaler* signal_wakeup_; |
| 112 CriticalSection crit_; | 112 CriticalSection crit_; |
| 113 bool fWait_; | 113 bool fWait_; |
| 114 #if defined(WEBRTC_WIN) | 114 #if defined(WEBRTC_WIN) |
| 115 WSAEVENT socket_ev_; | 115 WSAEVENT socket_ev_; |
| 116 #endif | 116 #endif |
| 117 }; | 117 }; |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 static int next_id_; | 220 static int next_id_; |
| 221 int id_; | 221 int id_; |
| 222 bool signal_close_; | 222 bool signal_close_; |
| 223 int signal_err_; | 223 int signal_err_; |
| 224 #endif // WEBRTC_WIN | 224 #endif // WEBRTC_WIN |
| 225 }; | 225 }; |
| 226 | 226 |
| 227 } // namespace rtc | 227 } // namespace rtc |
| 228 | 228 |
| 229 #endif // WEBRTC_BASE_PHYSICALSOCKETSERVER_H__ | 229 #endif // WEBRTC_BASE_PHYSICALSOCKETSERVER_H__ |
| OLD | NEW |