OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2011 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 "webrtc/p2p/base/basicpacketsocketfactory.h" | 11 #include "webrtc/p2p/base/basicpacketsocketfactory.h" |
12 | 12 |
13 #include "webrtc/p2p/base/asyncstuntcpsocket.h" | 13 #include "webrtc/p2p/base/asyncstuntcpsocket.h" |
14 #include "webrtc/p2p/base/stun.h" | 14 #include "webrtc/p2p/base/stun.h" |
15 #include "webrtc/base/asynctcpsocket.h" | 15 #include "webrtc/base/asynctcpsocket.h" |
16 #include "webrtc/base/asyncudpsocket.h" | 16 #include "webrtc/base/asyncudpsocket.h" |
17 #include "webrtc/base/logging.h" | 17 #include "webrtc/base/logging.h" |
18 #include "webrtc/base/nethelpers.h" | 18 #include "webrtc/base/nethelpers.h" |
19 #include "webrtc/base/physicalsocketserver.h" | 19 #include "webrtc/base/physicalsocketserver.h" |
20 #include "webrtc/base/scoped_ptr.h" | |
21 #include "webrtc/base/socketadapters.h" | 20 #include "webrtc/base/socketadapters.h" |
22 #include "webrtc/base/ssladapter.h" | 21 #include "webrtc/base/ssladapter.h" |
23 #include "webrtc/base/thread.h" | 22 #include "webrtc/base/thread.h" |
24 | 23 |
25 namespace rtc { | 24 namespace rtc { |
26 | 25 |
27 BasicPacketSocketFactory::BasicPacketSocketFactory() | 26 BasicPacketSocketFactory::BasicPacketSocketFactory() |
28 : thread_(Thread::Current()), | 27 : thread_(Thread::Current()), |
29 socket_factory_(NULL) { | 28 socket_factory_(NULL) { |
30 } | 29 } |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 SocketFactory* BasicPacketSocketFactory::socket_factory() { | 199 SocketFactory* BasicPacketSocketFactory::socket_factory() { |
201 if (thread_) { | 200 if (thread_) { |
202 ASSERT(thread_ == Thread::Current()); | 201 ASSERT(thread_ == Thread::Current()); |
203 return thread_->socketserver(); | 202 return thread_->socketserver(); |
204 } else { | 203 } else { |
205 return socket_factory_; | 204 return socket_factory_; |
206 } | 205 } |
207 } | 206 } |
208 | 207 |
209 } // namespace rtc | 208 } // namespace rtc |
OLD | NEW |