Crates.io | async-dns |
lib.rs | async-dns |
version | 0.1.1 |
source | src |
created_at | 2019-06-27 23:52:21.992377 |
updated_at | 2024-06-12 21:41:54.430993 |
description | A simple async DNS resolver |
homepage | https://github.com/notgull/async-dns/tree/master/async-dns#readme |
repository | https://github.com/notgull/async-dns/tree/master/async-dns |
max_upload_size | |
id | 144161 |
size | 60,001 |
This crate provides asynchronous DNS lookups.
In asynchronous Rust code, it is necessary to resolve URL names using DNS. In most cases, this is done by calling getaddrinfo
on a blocking threadpool. However, since DNS is a UDP-based protocol, it doesn't make much sense to block on a thread when fully asynchronous options are available.
This crate provides a fully asynchronous alternative, based on the following mechanisms:
DnsQueryEx
function, which allows for non-blocking DNS queries.dns-protocol
crate. async-fs
is used to read files and async-io
is used for the actual UDP packets.It returns the list of addresses that it found to be associated with the given name.
Dual licensed under the MIT and Apache 2.0 licenses.