dns_resolver::util::nameserver

Function query_nameserver_udp

Source
async fn query_nameserver_udp(
    address: SocketAddr,
    serialised_request: &mut [u8],
) -> Option<Message>
Expand description

Send a message to a remote nameserver over UDP, returning the response. If the message would be truncated, or an error occurs while sending it, None is returned. Otherwise the deserialised response message is: but this response is NOT validated - consumers MUST validate the response before using it!

This has a 5s timeout.