OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2009 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 2588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2599 cricket::RelayServerConfig config(cricket::RELAY_TURN); | 2599 cricket::RelayServerConfig config(cricket::RELAY_TURN); |
2600 config.credentials = kRelayCredentials; | 2600 config.credentials = kRelayCredentials; |
2601 config.ports.push_back( | 2601 config.ports.push_back( |
2602 cricket::ProtocolAddress(kTurnUdpIntAddr, cricket::PROTO_UDP, false)); | 2602 cricket::ProtocolAddress(kTurnUdpIntAddr, cricket::PROTO_UDP, false)); |
2603 allocator_->AddTurnServer(config); | 2603 allocator_->AddTurnServer(config); |
2604 allocator_->set_step_delay(kMinimumStepDelay); | 2604 allocator_->set_step_delay(kMinimumStepDelay); |
2605 } | 2605 } |
2606 | 2606 |
2607 cricket::P2PTransportChannel& StartTransportChannel( | 2607 cricket::P2PTransportChannel& StartTransportChannel( |
2608 bool prioritize_most_likely_to_work, | 2608 bool prioritize_most_likely_to_work, |
2609 int writable_connection_ping_interval) { | 2609 int max_strong_interval) { |
2610 channel_.reset( | 2610 channel_.reset( |
2611 new cricket::P2PTransportChannel("checks", 1, nullptr, allocator())); | 2611 new cricket::P2PTransportChannel("checks", 1, nullptr, allocator())); |
2612 cricket::IceConfig config = channel_->config(); | 2612 cricket::IceConfig config = channel_->config(); |
2613 config.prioritize_most_likely_candidate_pairs = | 2613 config.prioritize_most_likely_candidate_pairs = |
2614 prioritize_most_likely_to_work; | 2614 prioritize_most_likely_to_work; |
2615 config.writable_connection_ping_interval = | 2615 config.max_strong_interval = max_strong_interval; |
2616 writable_connection_ping_interval; | |
2617 channel_->SetIceConfig(config); | 2616 channel_->SetIceConfig(config); |
2618 PrepareChannel(channel_.get()); | 2617 PrepareChannel(channel_.get()); |
2619 channel_->Connect(); | 2618 channel_->Connect(); |
2620 channel_->MaybeStartGathering(); | 2619 channel_->MaybeStartGathering(); |
2621 return *channel_.get(); | 2620 return *channel_.get(); |
2622 } | 2621 } |
2623 | 2622 |
2624 cricket::BasicPortAllocator* allocator() { return allocator_.get(); } | 2623 cricket::BasicPortAllocator* allocator() { return allocator_.get(); } |
2625 cricket::TestTurnServer* turn_server() { return &turn_server_; } | 2624 cricket::TestTurnServer* turn_server() { return &turn_server_; } |
2626 | 2625 |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2805 | 2804 |
2806 // TCP Relay/Relay is the next. | 2805 // TCP Relay/Relay is the next. |
2807 VerifyNextPingableConnection(cricket::RELAY_PORT_TYPE, | 2806 VerifyNextPingableConnection(cricket::RELAY_PORT_TYPE, |
2808 cricket::RELAY_PORT_TYPE, | 2807 cricket::RELAY_PORT_TYPE, |
2809 cricket::TCP_PROTOCOL_NAME); | 2808 cricket::TCP_PROTOCOL_NAME); |
2810 | 2809 |
2811 // Finally, Local/Relay will be pinged. | 2810 // Finally, Local/Relay will be pinged. |
2812 VerifyNextPingableConnection(cricket::LOCAL_PORT_TYPE, | 2811 VerifyNextPingableConnection(cricket::LOCAL_PORT_TYPE, |
2813 cricket::RELAY_PORT_TYPE); | 2812 cricket::RELAY_PORT_TYPE); |
2814 } | 2813 } |
OLD | NEW |