| 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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 | 560 |
| 561 AsyncSocket* VirtualSocketServer::CreateAsyncSocket(int type) { | 561 AsyncSocket* VirtualSocketServer::CreateAsyncSocket(int type) { |
| 562 return CreateAsyncSocket(AF_INET, type); | 562 return CreateAsyncSocket(AF_INET, type); |
| 563 } | 563 } |
| 564 | 564 |
| 565 AsyncSocket* VirtualSocketServer::CreateAsyncSocket(int family, int type) { | 565 AsyncSocket* VirtualSocketServer::CreateAsyncSocket(int family, int type) { |
| 566 return CreateSocketInternal(family, type); | 566 return CreateSocketInternal(family, type); |
| 567 } | 567 } |
| 568 | 568 |
| 569 VirtualSocket* VirtualSocketServer::CreateSocketInternal(int family, int type) { | 569 VirtualSocket* VirtualSocketServer::CreateSocketInternal(int family, int type) { |
| 570 return new VirtualSocket(this, family, type, true); | 570 VirtualSocket* socket = new VirtualSocket(this, family, type, true); |
| 571 SignalSocketCreated(socket); |
| 572 return socket; |
| 571 } | 573 } |
| 572 | 574 |
| 573 void VirtualSocketServer::SetMessageQueue(MessageQueue* msg_queue) { | 575 void VirtualSocketServer::SetMessageQueue(MessageQueue* msg_queue) { |
| 574 msg_queue_ = msg_queue; | 576 msg_queue_ = msg_queue; |
| 575 if (msg_queue_) { | 577 if (msg_queue_) { |
| 576 msg_queue_->SignalQueueDestroyed.connect(this, | 578 msg_queue_->SignalQueueDestroyed.connect(this, |
| 577 &VirtualSocketServer::OnMessageQueueDestroyed); | 579 &VirtualSocketServer::OnMessageQueueDestroyed); |
| 578 } | 580 } |
| 579 } | 581 } |
| 580 | 582 |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1122 void VirtualSocketServer::SetDefaultRoute(const IPAddress& from_addr) { | 1124 void VirtualSocketServer::SetDefaultRoute(const IPAddress& from_addr) { |
| 1123 RTC_DCHECK(!IPIsAny(from_addr)); | 1125 RTC_DCHECK(!IPIsAny(from_addr)); |
| 1124 if (from_addr.family() == AF_INET) { | 1126 if (from_addr.family() == AF_INET) { |
| 1125 default_route_v4_ = from_addr; | 1127 default_route_v4_ = from_addr; |
| 1126 } else if (from_addr.family() == AF_INET6) { | 1128 } else if (from_addr.family() == AF_INET6) { |
| 1127 default_route_v6_ = from_addr; | 1129 default_route_v6_ = from_addr; |
| 1128 } | 1130 } |
| 1129 } | 1131 } |
| 1130 | 1132 |
| 1131 } // namespace rtc | 1133 } // namespace rtc |
| OLD | NEW |