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 2678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2689 cricket::RelayServerConfig config(cricket::RELAY_TURN); | 2689 cricket::RelayServerConfig config(cricket::RELAY_TURN); |
2690 config.credentials = kRelayCredentials; | 2690 config.credentials = kRelayCredentials; |
2691 config.ports.push_back( | 2691 config.ports.push_back( |
2692 cricket::ProtocolAddress(kTurnUdpIntAddr, cricket::PROTO_UDP, false)); | 2692 cricket::ProtocolAddress(kTurnUdpIntAddr, cricket::PROTO_UDP, false)); |
2693 allocator_->AddTurnServer(config); | 2693 allocator_->AddTurnServer(config); |
2694 allocator_->set_step_delay(kMinimumStepDelay); | 2694 allocator_->set_step_delay(kMinimumStepDelay); |
2695 } | 2695 } |
2696 | 2696 |
2697 cricket::P2PTransportChannel& StartTransportChannel( | 2697 cricket::P2PTransportChannel& StartTransportChannel( |
2698 bool prioritize_most_likely_to_work, | 2698 bool prioritize_most_likely_to_work, |
2699 int max_strong_interval) { | 2699 int writable_connection_ping_interval) { |
2700 channel_.reset( | 2700 channel_.reset( |
2701 new cricket::P2PTransportChannel("checks", 1, nullptr, allocator())); | 2701 new cricket::P2PTransportChannel("checks", 1, nullptr, allocator())); |
2702 cricket::IceConfig config = channel_->config(); | 2702 cricket::IceConfig config = channel_->config(); |
2703 config.prioritize_most_likely_candidate_pairs = | 2703 config.prioritize_most_likely_candidate_pairs = |
2704 prioritize_most_likely_to_work; | 2704 prioritize_most_likely_to_work; |
2705 config.max_strong_interval = max_strong_interval; | 2705 config.writable_connection_ping_interval = |
| 2706 writable_connection_ping_interval; |
2706 channel_->SetIceConfig(config); | 2707 channel_->SetIceConfig(config); |
2707 PrepareChannel(channel_.get()); | 2708 PrepareChannel(channel_.get()); |
2708 channel_->Connect(); | 2709 channel_->Connect(); |
2709 channel_->MaybeStartGathering(); | 2710 channel_->MaybeStartGathering(); |
2710 return *channel_.get(); | 2711 return *channel_.get(); |
2711 } | 2712 } |
2712 | 2713 |
2713 cricket::BasicPortAllocator* allocator() { return allocator_.get(); } | 2714 cricket::BasicPortAllocator* allocator() { return allocator_.get(); } |
2714 cricket::TestTurnServer* turn_server() { return &turn_server_; } | 2715 cricket::TestTurnServer* turn_server() { return &turn_server_; } |
2715 | 2716 |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2894 | 2895 |
2895 // TCP Relay/Relay is the next. | 2896 // TCP Relay/Relay is the next. |
2896 VerifyNextPingableConnection(cricket::RELAY_PORT_TYPE, | 2897 VerifyNextPingableConnection(cricket::RELAY_PORT_TYPE, |
2897 cricket::RELAY_PORT_TYPE, | 2898 cricket::RELAY_PORT_TYPE, |
2898 cricket::TCP_PROTOCOL_NAME); | 2899 cricket::TCP_PROTOCOL_NAME); |
2899 | 2900 |
2900 // Finally, Local/Relay will be pinged. | 2901 // Finally, Local/Relay will be pinged. |
2901 VerifyNextPingableConnection(cricket::LOCAL_PORT_TYPE, | 2902 VerifyNextPingableConnection(cricket::LOCAL_PORT_TYPE, |
2902 cricket::RELAY_PORT_TYPE); | 2903 cricket::RELAY_PORT_TYPE); |
2903 } | 2904 } |
OLD | NEW |