pub struct ClientConfig {
pub stun_serv_addr: String,
pub turn_serv_addr: String,
pub local_addr: SocketAddr,
pub transport_protocol: TransportProtocol,
pub username: String,
pub password: String,
pub realm: String,
pub software: String,
pub rto_in_ms: u64,
pub allocation_refresh_interval_cap: Option<Duration>,
}Expand description
ClientConfig is a bag of config parameters for Client.
Fields§
§stun_serv_addr: StringThe STUN server to use for Binding requests, as host:port. May be empty.
turn_serv_addr: StringThe TURN server to allocate from, as host:port.
local_addr: SocketAddrThe local address the client sends from.
transport_protocol: TransportProtocolWhether to reach the server over UDP or TCP.
username: StringThe long-term credential username for the TURN server.
password: StringThe long-term credential password.
realm: StringThe authentication realm, used in the MESSAGE-INTEGRITY computation.
software: StringAn optional SOFTWARE attribute value, sent for diagnostics.
rto_in_ms: u64The initial retransmission timeout in milliseconds; each retry doubles it.
allocation_refresh_interval_cap: Option<Duration>Optional upper bound for the interval between allocation Refresh requests.
By default, allocations are refreshed at half the lifetime advertised by the server. A shorter cap can also keep the client-to-server NAT mapping active when an allocation waits without carrying application traffic. Values below one second are rounded up.