pub struct UdpSocket { /* private fields */ }
Implementations§
Source§impl UdpSocket
impl UdpSocket
pub async fn bind(addrs: &[NetAddr]) -> Result<Self, Error>
pub async fn recv_msg(&self, bufsize: usize, flags: MsgFlags) -> Result<RecvMsg>
pub async fn send_msg( &self, buffer: &[u8], cmsg: &ControlMessage, flags: MsgFlags, addr: Option<&NetAddr>, ) -> Result<()>
pub fn local_addr(&self) -> Result<NetAddr, Error>
pub fn set_opt_ipv4_packet_info(&self, b: bool) -> Result<(), Error>
pub fn set_opt_ipv6_packet_info(&self, b: bool) -> Result<(), Error>
pub fn set_opt_reuse_port(&self, b: bool) -> Result<(), Error>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for UdpSocket
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