diff --git a/CHANGELOG.md b/CHANGELOG.md index de1c7904..cab72e1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,12 @@ # Changelog -## Unreleased +## 7.6.0 (14 Oct 2023) - Drop crossbeam-channel in favour of standard library channels - As of 1.67.0, the standard library's implementation is based on crossbeam-channel +- Take upstream c-ares 1.19.0 + - Introduces `Options::set_udp_max_queries()` ## 7.5.0 (29 Jan 2023) diff --git a/Cargo.toml b/Cargo.toml index 2a82716e..07c79fc1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "c-ares-resolver" license = "MIT" -version = "7.5.0" +version = "7.6.0" authors = ["David Hotham"] description = """ An asynchronous DNS resolver, backed by c-ares. @@ -15,7 +15,7 @@ edition = "2021" include = ["src/**/*", "LICENSE.txt", "README.md", "CHANGELOG.md"] [dependencies] -c-ares = "7.6.0" +c-ares = "7.7.0" futures-channel = "0.3.9" polling = "3.1.0" diff --git a/src/resolver.rs b/src/resolver.rs index 8442d135..3d9707fd 100644 --- a/src/resolver.rs +++ b/src/resolver.rs @@ -74,20 +74,6 @@ impl Options { self } - /// The path to use for reading the resolv.conf file. The `resolvconf_path` should be set to a - /// path string, and will be honoured on *nix like systems. The default is /etc/resolv.conf. - pub fn set_resolvconf_path(&mut self, resolvconf_path: &str) -> &mut Self { - self.inner.set_resolvconf_path(resolvconf_path); - self - } - - /// The path to use for reading the hosts file. The `hosts_path` should be set to a - /// path string, and will be honoured on *nix like systems. The default is /etc/hosts. - pub fn set_hosts_path(&mut self, hosts_path: &str) -> &mut Self { - self.inner.set_hosts_path(hosts_path); - self - } - /// Set the socket send buffer size. pub fn set_sock_send_buffer_size(&mut self, size: u32) -> &mut Self { self.inner.set_sock_send_buffer_size(size); @@ -117,6 +103,28 @@ impl Options { self.inner.set_ednspsz(size); self } + + /// The path to use for reading the resolv.conf file. The `resolvconf_path` should be set to a + /// path string, and will be honoured on *nix like systems. The default is /etc/resolv.conf. + pub fn set_resolvconf_path(&mut self, resolvconf_path: &str) -> &mut Self { + self.inner.set_resolvconf_path(resolvconf_path); + self + } + + /// The path to use for reading the hosts file. The `hosts_path` should be set to a + /// path string, and will be honoured on *nix like systems. The default is /etc/hosts. + pub fn set_hosts_path(&mut self, hosts_path: &str) -> &mut Self { + self.inner.set_hosts_path(hosts_path); + self + } + + /// The maximum number of udp queries that can be sent on a single ephemeral port to a given + /// DNS server before a new ephemeral port is assigned. Any value of 0 or less will be + /// considered unlimited, and is the default. + pub fn set_udp_max_queries(&mut self, udp_max_queries: i32) -> &mut Self { + self.inner.set_udp_max_queries(udp_max_queries); + self + } } /// An asynchronous DNS resolver, which returns results via callbacks.