pub fn send_magic_to<A: ToSocketAddrs>(&self, src: A, dst: A) -> std::io::Result<()> {
        let udp_sock = UdpSocket::bind(src)?;
        udp_sock.set_broadcast(true)?;
        udp_sock.send_to(&self.packet, dst)?;

        Ok(())
    }
/// Broadcasts the magic packet from / to specified address.
/// # Example
/// ```
/// use std::net::SocketAddr;
/// let wol = wakey::WolPacket::from_bytes(&vec![0x00, 0x01, 0x02, 0x03, 0x04, 0x05]);
/// let src = SocketAddr::from(([0,0,0,0], 0));
/// let dst = SocketAddr::from(([255,255,255,255], 9));
/// wol.send_magic_to(src, dst);
/// ```
Broadcasts the magic packet from / to specified address.
Broadcasts the magic packet from / to specified address .
pub fn send_magic_to<A: ToSocketAddrs>(&self, src: A, dst: A) -> std::io::Result<()> {
        let udp_sock = UdpSocket::bind(src)?;
        udp_sock.set_broadcast(true)?;
        udp_sock.send_to(&self.packet, dst)?;
        Ok(())
    }
pub fn send_magic_to < A : ToSocketAddrs > ( & self , src : A , dst : A ) -> std :: io :: Result < ( ) > { let udp_sock = UdpSocket :: bind ( src ) ? ; udp_sock . set_broadcast ( true ) ? ; udp_sock . send_to ( & self . packet , dst ) ? ; Ok ( ( ) ) }
Broadcasts the magic packet from / to specified address.
Broadcasts the magic packet from / to specified address .
&self
src
A
dst
A
example
None