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 2631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2642 cricket::RelayServerConfig config(cricket::RELAY_TURN); | 2642 cricket::RelayServerConfig config(cricket::RELAY_TURN); |
2643 config.credentials = kRelayCredentials; | 2643 config.credentials = kRelayCredentials; |
2644 config.ports.push_back( | 2644 config.ports.push_back( |
2645 cricket::ProtocolAddress(kTurnUdpIntAddr, cricket::PROTO_UDP, false)); | 2645 cricket::ProtocolAddress(kTurnUdpIntAddr, cricket::PROTO_UDP, false)); |
2646 allocator_->AddTurnServer(config); | 2646 allocator_->AddTurnServer(config); |
2647 allocator_->set_step_delay(kMinimumStepDelay); | 2647 allocator_->set_step_delay(kMinimumStepDelay); |
2648 } | 2648 } |
2649 | 2649 |
2650 cricket::P2PTransportChannel& StartTransportChannel( | 2650 cricket::P2PTransportChannel& StartTransportChannel( |
2651 bool prioritize_most_likely_to_work, | 2651 bool prioritize_most_likely_to_work, |
2652 int max_strong_interval) { | 2652 int writable_connection_ping_interval) { |
2653 channel_.reset( | 2653 channel_.reset( |
2654 new cricket::P2PTransportChannel("checks", 1, nullptr, allocator())); | 2654 new cricket::P2PTransportChannel("checks", 1, nullptr, allocator())); |
2655 cricket::IceConfig config = channel_->config(); | 2655 cricket::IceConfig config = channel_->config(); |
2656 config.prioritize_most_likely_candidate_pairs = | 2656 config.prioritize_most_likely_candidate_pairs = |
2657 prioritize_most_likely_to_work; | 2657 prioritize_most_likely_to_work; |
2658 config.max_strong_interval = max_strong_interval; | 2658 config.writable_connection_ping_interval = |
| 2659 writable_connection_ping_interval; |
2659 channel_->SetIceConfig(config); | 2660 channel_->SetIceConfig(config); |
2660 PrepareChannel(channel_.get()); | 2661 PrepareChannel(channel_.get()); |
2661 channel_->Connect(); | 2662 channel_->Connect(); |
2662 channel_->MaybeStartGathering(); | 2663 channel_->MaybeStartGathering(); |
2663 return *channel_.get(); | 2664 return *channel_.get(); |
2664 } | 2665 } |
2665 | 2666 |
2666 cricket::BasicPortAllocator* allocator() { return allocator_.get(); } | 2667 cricket::BasicPortAllocator* allocator() { return allocator_.get(); } |
2667 cricket::TestTurnServer* turn_server() { return &turn_server_; } | 2668 cricket::TestTurnServer* turn_server() { return &turn_server_; } |
2668 | 2669 |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2857 | 2858 |
2858 // TCP Relay/Relay is the next. | 2859 // TCP Relay/Relay is the next. |
2859 VerifyNextPingableConnection(cricket::RELAY_PORT_TYPE, | 2860 VerifyNextPingableConnection(cricket::RELAY_PORT_TYPE, |
2860 cricket::RELAY_PORT_TYPE, | 2861 cricket::RELAY_PORT_TYPE, |
2861 cricket::TCP_PROTOCOL_NAME); | 2862 cricket::TCP_PROTOCOL_NAME); |
2862 | 2863 |
2863 // Finally, Local/Relay will be pinged. | 2864 // Finally, Local/Relay will be pinged. |
2864 VerifyNextPingableConnection(cricket::LOCAL_PORT_TYPE, | 2865 VerifyNextPingableConnection(cricket::LOCAL_PORT_TYPE, |
2865 cricket::RELAY_PORT_TYPE); | 2866 cricket::RELAY_PORT_TYPE); |
2866 } | 2867 } |
OLD | NEW |