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

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

Performs the conversion.

Performs the conversion.

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.