pub struct Client { /* private fields */ }
Expand description
Client simulates “connection” to STUN server.
Implementations§
Source§impl Client
impl Client
Sourcepub fn poll_transmit(&mut self) -> Option<Transmit<BytesMut>>
pub fn poll_transmit(&mut self) -> Option<Transmit<BytesMut>>
Returns packets to transmit
It should be polled for transmit after:
- the application performed some I/O
- a call was made to
handle_read
- a call was made to
handle_write
- a call was made to
handle_timeout
pub fn poll_event(&mut self) -> Option<Event>
pub fn handle_read(&mut self, buf: &[u8]) -> Result<()>
pub fn handle_write(&mut self, m: Message) -> Result<()>
pub fn poll_timeout(&mut self) -> Option<Instant>
pub fn handle_timeout(&mut self, now: Instant) -> Result<()>
pub fn handle_close(&mut self) -> Result<()>
Auto Trait Implementations§
impl Freeze for Client
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