pub struct NatTraversalConfig {
pub role: EndpointRole,
pub bootstrap_nodes: Vec<SocketAddr>,
pub max_candidates: usize,
pub coordination_timeout: Duration,
pub enable_symmetric_nat: bool,
pub enable_relay_fallback: bool,
pub max_concurrent_attempts: usize,
pub bind_addr: Option<SocketAddr>,
pub prefer_rfc_nat_traversal: bool,
pub timeouts: TimeoutConfig,
}Expand description
Configuration for NAT traversal behavior
Fields§
§role: EndpointRoleRole of this endpoint in the network
bootstrap_nodes: Vec<SocketAddr>Bootstrap nodes for coordination and candidate discovery
max_candidates: usizeMaximum number of address candidates to maintain
coordination_timeout: DurationTimeout for coordination rounds
enable_symmetric_nat: boolEnable symmetric NAT prediction algorithms
enable_relay_fallback: boolEnable automatic relay fallback
max_concurrent_attempts: usizeMaximum concurrent NAT traversal attempts
bind_addr: Option<SocketAddr>Bind address for the endpoint (None = auto-select)
prefer_rfc_nat_traversal: boolPrefer RFC-compliant NAT traversal frame format When true, will send RFC-compliant frames if the peer supports it
timeouts: TimeoutConfigTimeout configuration for NAT traversal operations
Trait Implementations§
Source§impl Clone for NatTraversalConfig
impl Clone for NatTraversalConfig
Source§fn clone(&self) -> NatTraversalConfig
fn clone(&self) -> NatTraversalConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NatTraversalConfig
impl Debug for NatTraversalConfig
Source§impl Default for NatTraversalConfig
impl Default for NatTraversalConfig
Source§impl<'de> Deserialize<'de> for NatTraversalConfig
impl<'de> Deserialize<'de> for NatTraversalConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for NatTraversalConfig
impl RefUnwindSafe for NatTraversalConfig
impl Send for NatTraversalConfig
impl Sync for NatTraversalConfig
impl Unpin for NatTraversalConfig
impl UnwindSafe for NatTraversalConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more