pub struct Client { /* private fields */ }Expand description
Client is a STUN server client.
Implementations§
source§impl Client
impl Client
pub async fn new(config: ClientConfig) -> Result<Self, Error>
pub async fn listen(&self) -> Result<(), Error>
pub async fn allocate(&self) -> Result<impl Conn, Error>
pub async fn close(&self) -> Result<(), Error>
sourcepub async fn send_binding_request_to(
&self,
to: &str
) -> Result<SocketAddr, Error>
pub async fn send_binding_request_to( &self, to: &str ) -> Result<SocketAddr, Error>
Sends a new STUN request to the given transport address.
sourcepub async fn send_binding_request(&self) -> Result<SocketAddr, Error>
pub async fn send_binding_request(&self) -> Result<SocketAddr, Error>
Sends a new STUN request to the STUN server.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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