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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 | 571 |
572 AsyncSocket* VirtualSocketServer::CreateAsyncSocket(int type) { | 572 AsyncSocket* VirtualSocketServer::CreateAsyncSocket(int type) { |
573 return CreateAsyncSocket(AF_INET, type); | 573 return CreateAsyncSocket(AF_INET, type); |
574 } | 574 } |
575 | 575 |
576 AsyncSocket* VirtualSocketServer::CreateAsyncSocket(int family, int type) { | 576 AsyncSocket* VirtualSocketServer::CreateAsyncSocket(int family, int type) { |
577 return CreateSocketInternal(family, type); | 577 return CreateSocketInternal(family, type); |
578 } | 578 } |
579 | 579 |
580 VirtualSocket* VirtualSocketServer::CreateSocketInternal(int family, int type) { | 580 VirtualSocket* VirtualSocketServer::CreateSocketInternal(int family, int type) { |
581 return new VirtualSocket(this, family, type, true); | 581 VirtualSocket* socket = new VirtualSocket(this, family, type, true); |
| 582 SignalSocketCreated(socket); |
| 583 return socket; |
582 } | 584 } |
583 | 585 |
584 void VirtualSocketServer::SetMessageQueue(MessageQueue* msg_queue) { | 586 void VirtualSocketServer::SetMessageQueue(MessageQueue* msg_queue) { |
585 msg_queue_ = msg_queue; | 587 msg_queue_ = msg_queue; |
586 if (msg_queue_) { | 588 if (msg_queue_) { |
587 msg_queue_->SignalQueueDestroyed.connect(this, | 589 msg_queue_->SignalQueueDestroyed.connect(this, |
588 &VirtualSocketServer::OnMessageQueueDestroyed); | 590 &VirtualSocketServer::OnMessageQueueDestroyed); |
589 } | 591 } |
590 } | 592 } |
591 | 593 |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1133 void VirtualSocketServer::SetDefaultRoute(const IPAddress& from_addr) { | 1135 void VirtualSocketServer::SetDefaultRoute(const IPAddress& from_addr) { |
1134 RTC_DCHECK(!IPIsAny(from_addr)); | 1136 RTC_DCHECK(!IPIsAny(from_addr)); |
1135 if (from_addr.family() == AF_INET) { | 1137 if (from_addr.family() == AF_INET) { |
1136 default_route_v4_ = from_addr; | 1138 default_route_v4_ = from_addr; |
1137 } else if (from_addr.family() == AF_INET6) { | 1139 } else if (from_addr.family() == AF_INET6) { |
1138 default_route_v6_ = from_addr; | 1140 default_route_v6_ = from_addr; |
1139 } | 1141 } |
1140 } | 1142 } |
1141 | 1143 |
1142 } // namespace rtc | 1144 } // namespace rtc |
OLD | NEW |