Struct rustun::channel::ChannelBuilder
source · pub struct ChannelBuilder { /* private fields */ }
Expand description
Channel
builder.
Implementations§
source§impl ChannelBuilder
impl ChannelBuilder
sourcepub const DEFAULT_REQUEST_TIMEOUT_MS: u64 = 39_500u64
pub const DEFAULT_REQUEST_TIMEOUT_MS: u64 = 39_500u64
The default value of request_timeout
.
Reliability of STUN over TCP and TLS-over-TCP is handled by TCP itself, and there are no retransmissions at the STUN protocol level. However, for a request/response transaction, if the client has not received a response by Ti seconds after it sent the SYN to establish the connection, it considers the transaction to have timed out. Ti SHOULD be configurable and SHOULD have a default of 39.5s.
sourcepub fn request_timeout(&mut self, duration: Duration) -> &mut Self
pub fn request_timeout(&mut self, duration: Duration) -> &mut Self
Sets the request timeout duration of the channel.
The default value is DEFAULT_REQUEST_TIMEOUT_MS
.
sourcepub fn finish<A, T>(&self, transporter: T) -> Channel<A, T>where
A: Attribute,
T: StunTransport<A>,
pub fn finish<A, T>(&self, transporter: T) -> Channel<A, T>where
A: Attribute,
T: StunTransport<A>,
Makes a new Channel
instance with the given settings.
Trait Implementations§
source§impl Clone for ChannelBuilder
impl Clone for ChannelBuilder
source§fn clone(&self) -> ChannelBuilder
fn clone(&self) -> ChannelBuilder
Returns a copy 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 ChannelBuilder
impl Debug for ChannelBuilder
Auto Trait Implementations§
impl RefUnwindSafe for ChannelBuilder
impl Send for ChannelBuilder
impl Sync for ChannelBuilder
impl Unpin for ChannelBuilder
impl UnwindSafe for ChannelBuilder
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