Struct stunclient::StunClient [−][src]
pub struct StunClient { pub timeout: Duration, pub retry_interval: Duration, pub stun_server: SocketAddr, pub software: Option<&'static str>, }
Expand description
Options for querying STUN server
Fields
timeout: Duration
“End-to-end” timeout for the operation.
retry_interval: Duration
How often to repeat STUN binding requests
stun_server: SocketAddr
Address of the STUN server
software: Option<&'static str>
SOFTWARE
attribute value in binding request
Implementations
A constructor with default parameters
Use hard coded STUN server stun.l.google.com:19302
.
Not for production use, for tests, prototypes and demos. May block the thread. May panic in case of address resolution problems.
Set timeout
field, builder pattern.
Set retry_interval
field, builder pattern.
Set software
field, builder pattern.
Get external (server-reflexive transport address) IP address and port of specified UDP socket
async version of query_external_address
.
Requires async
crate feature to be enabled (it is by default)
Auto Trait Implementations
impl RefUnwindSafe for StunClient
impl Send for StunClient
impl Sync for StunClient
impl Unpin for StunClient
impl UnwindSafe for StunClient