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 // This struct is built using the FieldTrialParser, and then not modified. 23 // TODO(jonaso) : Consider how members of this struct can be made const. 24 25 bool skip_relay_to_non_relay_connections = false; 26 absl::optional<int> max_outstanding_pings; 27 28 // Wait X ms before selecting a connection when having none. 29 // This will make media slower, but will give us chance to find 30 // a better connection before starting. 31 absl::optional<int> initial_select_dampening; 32 33 // If the connection has recevied a ping-request, delay by 34 // maximum this delay. This will make media slower, but will 35 // give us chance to find a better connection before starting. 36 absl::optional<int> initial_select_dampening_ping_received; 37 38 // Announce GOOG_PING support in STUN_BINDING_RESPONSE if requested 39 // by peer. 40 bool announce_goog_ping = true; 41 42 // Enable sending GOOG_PING if remote announce it. 43 bool enable_goog_ping = false; 44 45 // Decay rate for RTT estimate using EventBasedExponentialMovingAverage 46 // expressed as halving time. 47 int rtt_estimate_halftime_ms = 500; 48 49 // Sending a PING directly after a switch on ICE_CONTROLLING-side. 50 // TODO(jonaso) : Deprecate this in favor of 51 // `send_ping_on_selected_ice_controlling`. 52 bool send_ping_on_switch_ice_controlling = false; 53 54 // Sending a PING directly after selecting a connection 55 // (i.e either a switch or the inital selection). 56 bool send_ping_on_selected_ice_controlling = false; 57 58 // Sending a PING directly after a nomination on ICE_CONTROLLED-side. 59 bool send_ping_on_nomination_ice_controlled = false; 60 61 // The timeout after which the connection will be considered dead if no 62 // traffic is received. 63 int dead_connection_timeout_ms = 30000; 64 65 // Stop gathering when having a strong connection. 66 bool stop_gather_on_strongly_connected = true; 67 68 // DSCP taging. 69 absl::optional<int> override_dscp; 70 71 bool piggyback_ice_check_acknowledgement = false; 72 bool extra_ice_ping = false; 73 }; 74 75 } // namespace cricket 76 77 #endif // P2P_BASE_P2P_TRANSPORT_CHANNEL_ICE_FIELD_TRIALS_H_ 78