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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 send_buffer_.insert(send_buffer_.end(), cpv, cpv + consumed); | 504 send_buffer_.insert(send_buffer_.end(), cpv, cpv + consumed); |
505 server_->SendTcp(this); | 505 server_->SendTcp(this); |
506 return static_cast<int>(consumed); | 506 return static_cast<int>(consumed); |
507 } | 507 } |
508 | 508 |
509 VirtualSocketServer::VirtualSocketServer(SocketServer* ss) | 509 VirtualSocketServer::VirtualSocketServer(SocketServer* ss) |
510 : server_(ss), | 510 : server_(ss), |
511 server_owned_(false), | 511 server_owned_(false), |
512 msg_queue_(NULL), | 512 msg_queue_(NULL), |
513 stop_on_idle_(false), | 513 stop_on_idle_(false), |
514 network_delay_(0), | 514 network_delay_(TimeMillis()), |
515 next_ipv4_(kInitialNextIPv4), | 515 next_ipv4_(kInitialNextIPv4), |
516 next_ipv6_(kInitialNextIPv6), | 516 next_ipv6_(kInitialNextIPv6), |
517 next_port_(kFirstEphemeralPort), | 517 next_port_(kFirstEphemeralPort), |
518 bindings_(new AddressMap()), | 518 bindings_(new AddressMap()), |
519 connections_(new ConnectionMap()), | 519 connections_(new ConnectionMap()), |
520 bandwidth_(0), | 520 bandwidth_(0), |
521 network_capacity_(kDefaultNetworkCapacity), | 521 network_capacity_(kDefaultNetworkCapacity), |
522 send_buffer_capacity_(kDefaultTcpBufferSize), | 522 send_buffer_capacity_(kDefaultTcpBufferSize), |
523 recv_buffer_capacity_(kDefaultTcpBufferSize), | 523 recv_buffer_capacity_(kDefaultTcpBufferSize), |
524 delay_mean_(0), | 524 delay_mean_(0), |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 void VirtualSocketServer::SetDefaultRoute(const IPAddress& from_addr) { | 1141 void VirtualSocketServer::SetDefaultRoute(const IPAddress& from_addr) { |
1142 RTC_DCHECK(!IPIsAny(from_addr)); | 1142 RTC_DCHECK(!IPIsAny(from_addr)); |
1143 if (from_addr.family() == AF_INET) { | 1143 if (from_addr.family() == AF_INET) { |
1144 default_route_v4_ = from_addr; | 1144 default_route_v4_ = from_addr; |
1145 } else if (from_addr.family() == AF_INET6) { | 1145 } else if (from_addr.family() == AF_INET6) { |
1146 default_route_v6_ = from_addr; | 1146 default_route_v6_ = from_addr; |
1147 } | 1147 } |
1148 } | 1148 } |
1149 | 1149 |
1150 } // namespace rtc | 1150 } // namespace rtc |
OLD | NEW |