pub struct MulticastSocket { /* private fields */ }Implementations§
Source§impl MulticastSocket
impl MulticastSocket
pub fn all_interfaces(multicast_address: SocketAddrV4) -> Result<Self>
pub fn with_options( multicast_address: SocketAddrV4, interfaces: Vec<Ipv4Addr>, options: MulticastOptions, ) -> Result<Self>
Source§impl MulticastSocket
impl MulticastSocket
pub fn receive(&self) -> Result<Message>
pub fn send_to( &self, buf: &[u8], interface: &Interface, addr: SocketAddrV4, ) -> Result<usize>
pub fn send(&self, buf: &[u8], interface: &Interface) -> Result<usize>
pub fn broadcast_to(&self, buf: &[u8], addr: SocketAddrV4) -> Result<()>
pub fn broadcast(&self, buf: &[u8]) -> Result<()>
Trait Implementations§
Source§impl TryFrom<MulticastSocket> for AsyncMulticastSocket
Available on crate feature tokio only.Converts this socket in to one with an async API.
This will call bind on the socket if it has not already
been bound.
impl TryFrom<MulticastSocket> for AsyncMulticastSocket
Available on crate feature
tokio only.Converts this socket in to one with an async API.
This will call bind on the socket if it has not already
been bound.
Auto Trait Implementations§
impl Freeze for MulticastSocket
impl RefUnwindSafe for MulticastSocket
impl Send for MulticastSocket
impl Sync for MulticastSocket
impl Unpin for MulticastSocket
impl UnsafeUnpin for MulticastSocket
impl UnwindSafe for MulticastSocket
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