pub struct P2PConfig {
pub max_punch_attempts: u8,
pub punch_timeout: Duration,
pub punch_interval: Duration,
pub peer_timeout: Duration,
pub enable_relay: bool,
}Expand description
Configuration for P2P networking.
Fields§
§max_punch_attempts: u8Maximum NAT punch attempts before falling back to relay.
punch_timeout: DurationTimeout for NAT hole-punching.
punch_interval: DurationInterval between punch packets.
peer_timeout: DurationPeer timeout (no packets received).
enable_relay: boolEnable relay fallback when direct connection fails.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for P2PConfig
impl RefUnwindSafe for P2PConfig
impl Send for P2PConfig
impl Sync for P2PConfig
impl Unpin for P2PConfig
impl UnwindSafe for P2PConfig
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