Struct webrtc::api::setting_engine::SettingEngine[][src]

pub struct SettingEngine { /* fields omitted */ }
Expand description

SettingEngine allows influencing behavior in ways that are not supported by the WebRTC API. This allows us to support additional use-cases without deviating from the WebRTC API elsewhere.

Implementations

detach_data_channels enables detaching data channels. When enabled data channels have to be detached in the OnOpen callback using the DataChannel.Detach method.

set_srtp_protection_profiles allows the user to override the default srtp Protection Profiles The default srtp protection profiles are provided by the function defaultSrtpProtectionProfiles

set_ice_timeouts sets the behavior around ICE Timeouts

  • disconnected_timeout is the duration without network activity before a Agent is considered disconnected. Default is 5 Seconds
  • failed_timeout is the duration without network activity before a Agent is considered failed after disconnected. Default is 25 Seconds
  • keep_alive_interval is how often the ICE Agent sends extra traffic if there is no activity, if media is flowing no traffic will be sent. Default is 2 seconds

set_host_acceptance_min_wait sets the icehost_acceptance_min_wait

set_srflx_acceptance_min_wait sets the icesrflx_acceptance_min_wait

set_prflx_acceptance_min_wait sets the iceprflx_acceptance_min_wait

set_relay_acceptance_min_wait sets the icerelay_acceptance_min_wait

set_ephemeral_udp_port_range limits the pool of ephemeral ports that ICE UDP connections can allocate from. This affects both host candidates, and the local address of server reflexive candidates.

set_lite configures whether or not the ice agent should be a lite agent

set_network_types configures what types of candidate networks are supported during local and server reflexive gathering.

set_interface_filter sets the filtering functions when gathering ICE candidates This can be used to exclude certain network interfaces from ICE. Which may be useful if you know a certain interface will never succeed, or if you wish to reduce the amount of information you wish to expose to the remote peer

set_nat_1to1_ips sets a list of external IP addresses of 1:1 (D)NAT and a candidate type for which the external IP address is used. This is useful when you are host a server using Pion on an AWS EC2 instance which has a private address, behind a 1:1 DNAT with a public IP (e.g. Elastic IP). In this case, you can give the public IP address so that Pion will use the public IP address in its candidate instead of the private IP address. The second argument, candidate_type, is used to tell Pion which type of candidate should use the given public IP address. Two types of candidates are supported:

ICECandidateTypeHost: The public IP address will be used for the host candidate in the SDP. ICECandidateTypeSrflx: A server reflexive candidate with the given public IP address will be added to the SDP.

Please note that if you choose ICECandidateTypeHost, then the private IP address won’t be advertised with the peer. Also, this option cannot be used along with mDNS.

If you choose ICECandidateTypeSrflx, it simply adds a server reflexive candidate with the public IP. The host candidate is still available along with mDNS capabilities unaffected. Also, you cannot give STUN server URL at the same time. It will result in an error otherwise.

set_answering_dtls_role sets the dtls_transport role that is selected when offering The dtls_transport role controls if the WebRTC Client as a client or server. This may be useful when interacting with non-compliant clients or debugging issues.

DTLSRoleActive: Act as dtls_transport Client, send the ClientHello and starts the handshake DTLSRolePassive: Act as dtls_transport Server, wait for ClientHello

set_vnet sets the VNet instance that is passed to ice VNet is a virtual network layer, allowing users to simulate different topologies, latency, loss and jitter. This can be useful for learning WebRTC concepts or testing your application in a lab environment

set_ice_multicast_dns_mode controls if ice queries and generates mDNS ICE Candidates

set_multicast_dns_host_name sets a static HostName to be used by ice instead of generating one on startup This should only be used for a single PeerConnection. Having multiple PeerConnections with the same HostName will cause undefined behavior

set_ice_credentials sets a staic uFrag/uPwd to be used by ice This is useful if you want to do signalless WebRTC session, or having a reproducible environment with static credentials

disable_certificate_fingerprint_verification disables fingerprint verification after dtls_transport Handshake has finished

set_dtls_replay_protection_window sets a replay attack protection window size of dtls_transport connection.

set_srtp_replay_protection_window sets a replay attack protection window size of srtp session.

set_srtcp_replay_protection_window sets a replay attack protection window size of srtcp session.

disable_srtp_replay_protection disables srtp replay protection.

disable_srtcp_replay_protection disables srtcp replay protection.

set_sdp_media_level_fingerprints configures the logic for dtls_transport Fingerprint insertion If true, fingerprints will be inserted in the sdp at the fingerprint level, instead of the session level. This helps with compatibility with some webrtc implementations.

disable_media_engine_copy stops the MediaEngine from being copied. This allows a user to modify the MediaEngine after the PeerConnection has been constructed. This is useful if you wish to modify codecs after signaling. Make sure not to share MediaEngines between PeerConnections.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Converts self into T using Into<T>. Read more

Converts self into a target type. Read more

Causes self to use its Binary implementation when Debug-formatted.

Causes self to use its Display implementation when Debug-formatted. Read more

Causes self to use its LowerExp implementation when Debug-formatted. Read more

Causes self to use its LowerHex implementation when Debug-formatted. Read more

Causes self to use its Octal implementation when Debug-formatted.

Causes self to use its Pointer implementation when Debug-formatted. Read more

Causes self to use its UpperExp implementation when Debug-formatted. Read more

Causes self to use its UpperHex implementation when Debug-formatted. Read more

Performs the conversion.

Performs the conversion.

Pipes by value. This is generally the method you want to use. Read more

Borrows self and passes that borrow into the pipe function. Read more

Mutably borrows self and passes that borrow into the pipe function. Read more

Borrows self, then passes self.borrow() into the pipe function. Read more

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more

Borrows self, then passes self.as_ref() into the pipe function.

Mutably borrows self, then passes self.as_mut() into the pipe function. Read more

Borrows self, then passes self.deref() into the pipe function.

Mutably borrows self, then passes self.deref_mut() into the pipe function. Read more

Pipes a value into a function that cannot ordinarily be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a dereference into a function that cannot normally be called in suffix position. Read more

Pipes a mutable dereference into a function that cannot normally be called in suffix position. Read more

Pipes a reference into a function that cannot ordinarily be called in suffix position. Read more

Pipes a mutable reference into a function that cannot ordinarily be called in suffix position. Read more

Should always be Self

Immutable access to a value. Read more

Mutable access to a value. Read more

Immutable access to the Borrow<B> of a value. Read more

Mutable access to the BorrowMut<B> of a value. Read more

Immutable access to the AsRef<R> view of a value. Read more

Mutable access to the AsMut<R> view of a value. Read more

Immutable access to the Deref::Target of a value. Read more

Mutable access to the Deref::Target of a value. Read more

Calls .tap() only in debug builds, and is erased in release builds.

Calls .tap_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref_mut() only in debug builds, and is erased in release builds. Read more

Provides immutable access for inspection. Read more

Calls tap in debug builds, and does nothing in release builds.

Provides mutable access for modification. Read more

Calls tap_mut in debug builds, and does nothing in release builds.

Provides immutable access to the reference for inspection.

Calls tap_ref in debug builds, and does nothing in release builds.

Provides mutable access to the reference for modification.

Calls tap_ref_mut in debug builds, and does nothing in release builds.

Provides immutable access to the borrow for inspection. Read more

Calls tap_borrow in debug builds, and does nothing in release builds.

Provides mutable access to the borrow for modification.

Calls tap_borrow_mut in debug builds, and does nothing in release builds. Read more

Immutably dereferences self for inspection.

Calls tap_deref in debug builds, and does nothing in release builds.

Mutably dereferences self for modification.

Calls tap_deref_mut in debug builds, and does nothing in release builds. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Attempts to convert self into T using TryInto<T>. Read more

Attempts to convert self into a target type. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.