Update trust-dns
This commit is contained in:
parent
968e3bae5a
commit
72326fb5ee
|
@ -11,7 +11,7 @@ futures-io = "0.3.21"
|
|||
jive = { git = "https://git.asonix.dog/safe-async/jive", features = [
|
||||
"futures-io-compat",
|
||||
] }
|
||||
trust-dns-proto = { version = "0.21.0", default-features = false }
|
||||
trust-dns-resolver = { version = "0.21.1", default-features = false, features = [
|
||||
trust-dns-proto = { version = "0.22.0", default-features = false }
|
||||
trust-dns-resolver = { version = "0.22.0", default-features = false, features = [
|
||||
"system-config",
|
||||
] }
|
||||
|
|
16
src/lib.rs
16
src/lib.rs
|
@ -118,6 +118,22 @@ impl AsyncWrite for JiveTcpStream {
|
|||
impl trust_dns_proto::udp::UdpSocket for JiveUdpSocket {
|
||||
type Time = JiveTimer;
|
||||
|
||||
async fn connect(addr: std::net::SocketAddr) -> std::io::Result<Self> {
|
||||
let bind_addr: std::net::SocketAddr = match addr {
|
||||
std::net::SocketAddr::V4(_) => (std::net::Ipv4Addr::UNSPECIFIED, 0).into(),
|
||||
std::net::SocketAddr::V6(_) => (std::net::Ipv6Addr::UNSPECIFIED, 0).into(),
|
||||
};
|
||||
|
||||
Self::bind(bind_addr).await
|
||||
}
|
||||
|
||||
async fn connect_with_bind(
|
||||
_addr: std::net::SocketAddr,
|
||||
bind_addr: std::net::SocketAddr,
|
||||
) -> std::io::Result<Self> {
|
||||
Self::bind(bind_addr).await
|
||||
}
|
||||
|
||||
async fn bind(addr: std::net::SocketAddr) -> std::io::Result<Self> {
|
||||
let io = jive::io::Async::<jive::net::UdpSocket>::bind(addr).await?;
|
||||
|
||||
|
|
Loading…
Reference in a new issue