Implement connect_with_bind
This commit is contained in:
parent
2241a178fb
commit
968e3bae5a
10
src/lib.rs
10
src/lib.rs
|
@ -72,13 +72,13 @@ impl trust_dns_proto::tcp::Connect for JiveTcpStream {
|
|||
addr: std::net::SocketAddr,
|
||||
bind_addr: Option<std::net::SocketAddr>,
|
||||
) -> std::io::Result<Self> {
|
||||
if let Some(_bind_addr) = bind_addr {
|
||||
todo!("Implement connect with bind");
|
||||
let io = if let Some(_bind_addr) = bind_addr {
|
||||
jive::io::Async::<jive::net::TcpStream>::connect_with_bind(addr, bind_addr).await?
|
||||
} else {
|
||||
let io = jive::io::Async::<jive::net::TcpStream>::connect(addr).await?;
|
||||
jive::io::Async::<jive::net::TcpStream>::connect(addr).await?
|
||||
};
|
||||
|
||||
Ok(JiveTcpStream { io })
|
||||
}
|
||||
Ok(JiveTcpStream { io })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue