pub struct UdpSocket { /* private fields */ }Implementations§
source§impl UdpSocket
impl UdpSocket
pub async fn client( listen_addr: SocketAddr, peer_addr: SocketAddr ) -> Result<UdpSocket>
pub async fn client_with_timestamping( listen_addr: SocketAddr, peer_addr: SocketAddr, interface: Option<InterfaceName>, timestamping: EnableTimestamps ) -> Result<UdpSocket>
pub async fn server( listen_addr: SocketAddr, interface: Option<InterfaceName> ) -> Result<UdpSocket>
pub async fn send( &mut self, buf: &[u8] ) -> Result<(usize, Option<NtpTimestamp>)>
pub async fn send_to(&self, buf: &[u8], addr: SocketAddr) -> Result<usize>
pub async fn recv( &self, buf: &mut [u8] ) -> Result<(usize, SocketAddr, Option<NtpTimestamp>)>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for UdpSocket
impl Send for UdpSocket
impl Sync for UdpSocket
impl Unpin for UdpSocket
impl !UnwindSafe for UdpSocket
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