1 /* 2 * Copyright 2019 The WebRTC Project Authors. All rights reserved. 3 * 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 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #ifndef P2P_BASE_P2P_TRANSPORT_CHANNEL_ICE_FIELD_TRIALS_H_ 12 #define P2P_BASE_P2P_TRANSPORT_CHANNEL_ICE_FIELD_TRIALS_H_ 13 14 #include "absl/types/optional.h" 15 16 namespace cricket { 17 18 // Field trials for P2PTransportChannel and friends, 19 // put in separate file so that they can be shared e.g 20 // with Connection. 21 struct IceFieldTrials { 22 bool skip_relay_to_non_relay_connections = false; 23 absl::optional<int> max_outstanding_pings; 24 25 // Wait X ms before selecting a connection when having none. 26 // This will make media slower, but will give us chance to find 27 // a better connection before starting. 28 absl::optional<int> initial_select_dampening; 29 30 // If the connection has recevied a ping-request, delay by 31 // maximum this delay. This will make media slower, but will 32 // give us chance to find a better connection before starting. 33 absl::optional<int> initial_select_dampening_ping_received; 34 35 // Announce GOOG_PING support in STUN_BINDING_RESPONSE if requested 36 // by peer. 37 bool announce_goog_ping = true; 38 39 // Enable sending GOOG_PING if remote announce it. 40 bool enable_goog_ping = false; 41 42 // Decay rate for RTT estimate using EventBasedExponentialMovingAverage 43 // expressed as halving time. 44 int rtt_estimate_halftime_ms = 500; 45 46 // Sending a PING directly after a switch on ICE_CONTROLLING-side. 47 bool send_ping_on_switch_ice_controlling = false; 48 49 // Sending a PING directly after a nomination on ICE_CONTROLLED-side. 50 bool send_ping_on_nomination_ice_controlled = false; 51 52 // The timeout after which the connection will be considered dead if no 53 // traffic is received. 54 int dead_connection_timeout_ms = 30000; 55 }; 56 57 } // namespace cricket 58 59 #endif // P2P_BASE_P2P_TRANSPORT_CHANNEL_ICE_FIELD_TRIALS_H_ 60