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 2689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2700 cricket::RelayServerConfig config(cricket::RELAY_TURN); | 2700 cricket::RelayServerConfig config(cricket::RELAY_TURN); |
2701 config.credentials = kRelayCredentials; | 2701 config.credentials = kRelayCredentials; |
2702 config.ports.push_back( | 2702 config.ports.push_back( |
2703 cricket::ProtocolAddress(kTurnUdpIntAddr, cricket::PROTO_UDP, false)); | 2703 cricket::ProtocolAddress(kTurnUdpIntAddr, cricket::PROTO_UDP, false)); |
2704 allocator_->AddTurnServer(config); | 2704 allocator_->AddTurnServer(config); |
2705 allocator_->set_step_delay(kMinimumStepDelay); | 2705 allocator_->set_step_delay(kMinimumStepDelay); |
2706 } | 2706 } |
2707 | 2707 |
2708 cricket::P2PTransportChannel& StartTransportChannel( | 2708 cricket::P2PTransportChannel& StartTransportChannel( |
2709 bool prioritize_most_likely_to_work, | 2709 bool prioritize_most_likely_to_work, |
2710 int max_strong_interval) { | 2710 int stable_writable_connection_ping_interval) { |
2711 channel_.reset( | 2711 channel_.reset( |
2712 new cricket::P2PTransportChannel("checks", 1, nullptr, allocator())); | 2712 new cricket::P2PTransportChannel("checks", 1, nullptr, allocator())); |
2713 cricket::IceConfig config = channel_->config(); | 2713 cricket::IceConfig config = channel_->config(); |
2714 config.prioritize_most_likely_candidate_pairs = | 2714 config.prioritize_most_likely_candidate_pairs = |
2715 prioritize_most_likely_to_work; | 2715 prioritize_most_likely_to_work; |
2716 config.max_strong_interval = max_strong_interval; | 2716 config.stable_writable_connection_ping_interval = |
| 2717 stable_writable_connection_ping_interval; |
2717 channel_->SetIceConfig(config); | 2718 channel_->SetIceConfig(config); |
2718 PrepareChannel(channel_.get()); | 2719 PrepareChannel(channel_.get()); |
2719 channel_->Connect(); | 2720 channel_->Connect(); |
2720 channel_->MaybeStartGathering(); | 2721 channel_->MaybeStartGathering(); |
2721 return *channel_.get(); | 2722 return *channel_.get(); |
2722 } | 2723 } |
2723 | 2724 |
2724 cricket::BasicPortAllocator* allocator() { return allocator_.get(); } | 2725 cricket::BasicPortAllocator* allocator() { return allocator_.get(); } |
2725 cricket::TestTurnServer* turn_server() { return &turn_server_; } | 2726 cricket::TestTurnServer* turn_server() { return &turn_server_; } |
2726 | 2727 |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2915 | 2916 |
2916 // TCP Relay/Relay is the next. | 2917 // TCP Relay/Relay is the next. |
2917 VerifyNextPingableConnection(cricket::RELAY_PORT_TYPE, | 2918 VerifyNextPingableConnection(cricket::RELAY_PORT_TYPE, |
2918 cricket::RELAY_PORT_TYPE, | 2919 cricket::RELAY_PORT_TYPE, |
2919 cricket::TCP_PROTOCOL_NAME); | 2920 cricket::TCP_PROTOCOL_NAME); |
2920 | 2921 |
2921 // Finally, Local/Relay will be pinged. | 2922 // Finally, Local/Relay will be pinged. |
2922 VerifyNextPingableConnection(cricket::LOCAL_PORT_TYPE, | 2923 VerifyNextPingableConnection(cricket::LOCAL_PORT_TYPE, |
2923 cricket::RELAY_PORT_TYPE); | 2924 cricket::RELAY_PORT_TYPE); |
2924 } | 2925 } |
OLD | NEW |