Skip to main content

write_magic_packet

Function write_magic_packet 

Source
pub fn write_magic_packet<W: Write>(
    sink: &mut W,
    mac_address: MacAddress,
    secure_on: Option<SecureOn>,
) -> Result<()>
Expand description

Write a magic packet to a buffer.

Write a magic packet to sink, to wake up mac_address. If secure_on is not None, include it at the end of the magic packet.

See SecureOn for more information about SecureON.

ยงErrors

Return an error if the underlying Write::write_all fails.