Struct ezk_stun::StunEndpoint
source · pub struct StunEndpoint<U: StunEndpointUser> { /* private fields */ }
Expand description
Transport agnostic endpoint. Uses StunEndpointUser
to define
send/receive behavior.
Implementations§
source§impl<U: StunEndpointUser> StunEndpoint<U>
impl<U: StunEndpointUser> StunEndpoint<U>
pub fn new(user: U) -> Self
pub fn user(&self) -> &U
pub fn user_mut(&mut self) -> &mut U
pub async fn send_request( &self, request: Request<'_, U::Transport>, target: SocketAddr ) -> Result<Option<ParsedMessage>>
sourcepub async fn receive(
&self,
message: ParsedMessage,
source: SocketAddr,
transport: U::Transport
)
pub async fn receive( &self, message: ParsedMessage, source: SocketAddr, transport: U::Transport )
Pass a received STUN message to the endpoint for further processing
Auto Trait Implementations§
impl<U> !RefUnwindSafe for StunEndpoint<U>
impl<U> Send for StunEndpoint<U>
impl<U> Sync for StunEndpoint<U>
impl<U> Unpin for StunEndpoint<U>where U: Unpin,
impl<U> !UnwindSafe for StunEndpoint<U>
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