dns_resolver::util::net

Function send_udp_bytes

Source
pub async fn send_udp_bytes(
    sock: &UdpSocket,
    bytes: &mut [u8],
) -> Result<(), Error>
Expand description

Write a serialised message to a UDP channel. This sets or clears the TC flag as appropriate.

§Errors

If sending the message fails.

§Panics

If given an incomplete (< 12 byte) message.