Struct stun_client::Client [−][src]
pub struct Client { /* fields omitted */ }
STUN client. The transport protocol is UDP only and only supports simple STUN Binding requests.
Implementations
impl Client
[src]
impl Client
[src]pub async fn new<A: ToSocketAddrs>(
local_bind_addr: A,
opts: Option<Options>
) -> Result<Client, STUNClientError>
[src]
pub async fn new<A: ToSocketAddrs>(
local_bind_addr: A,
opts: Option<Options>
) -> Result<Client, STUNClientError>
[src]Create a Client.
pub fn from_socket(socket: Arc<UdpSocket>, opts: Option<Options>) -> Client
[src]
pub fn from_socket(socket: Arc<UdpSocket>, opts: Option<Options>) -> Client
[src]Create a Client from async_std::net::UdpSocket.
pub async fn binding_request<A: ToSocketAddrs>(
&mut self,
stun_addr: A,
attrs: Option<HashMap<Attribute, Vec<u8>>>
) -> Result<Message, STUNClientError>
[src]
pub async fn binding_request<A: ToSocketAddrs>(
&mut self,
stun_addr: A,
attrs: Option<HashMap<Attribute, Vec<u8>>>
) -> Result<Message, STUNClientError>
[src]Send STUN Binding request asynchronously.
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
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,