File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ want = "0.3"
43
43
44
44
libc = { version = " 0.2" , optional = true }
45
45
socket2 = { version = " 0.4.7" , optional = true , features = [" all" ] }
46
- wasmedge_wasi_socket = {version = " 0.4.2 " , optional = true }
46
+ wasmedge_wasi_socket = {version = " 0.4.3 " , optional = true }
47
47
48
48
[dev-dependencies ]
49
49
futures-util = { version = " 0.3" , default-features = false , features = [" alloc" ] }
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ use std::str::FromStr;
32
32
use std:: task:: { self , Poll } ;
33
33
use std:: { fmt, io, vec} ;
34
34
#[ cfg( target_os = "wasi" ) ]
35
- use wasmedge_wasi_socket:: { nslookup , SocketAddr } ;
35
+ use wasmedge_wasi_socket:: { SocketAddr , ToSocketAddrs } ;
36
36
37
37
use tokio:: task:: JoinHandle ;
38
38
use tower_service:: Service ;
@@ -133,9 +133,9 @@ impl Service<Name> for GaiResolver {
133
133
#[ cfg( target_os = "wasi" ) ]
134
134
let blocking = tokio:: task:: spawn ( async move {
135
135
debug ! ( "resolving host={:?}" , name. host) ;
136
- nslookup ( & * name. host , "http" ) . map ( |i| SocketAddrs {
137
- iter : i . into_iter ( ) ,
138
- } )
136
+ ( & * name. host , 0 )
137
+ . to_socket_addrs ( )
138
+ . map ( |i| SocketAddrs { iter : i } )
139
139
} ) ;
140
140
GaiFuture { inner : blocking }
141
141
}
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ use std::net::{SocketAddr, TcpListener as StdTcpListener};
5
5
#[ cfg( all( feature = "tcp" , target_os = "wasi" ) ) ]
6
6
use wasmedge_wasi_socket:: { SocketAddr , TcpListener as StdTcpListener } ;
7
7
8
- // #[cfg(feature = "tcp")]
9
- // use std::time::Duration;
8
+ #[ cfg( feature = "tcp" ) ]
9
+ use std:: time:: Duration ;
10
10
11
11
use pin_project_lite:: pin_project;
12
12
You can’t perform that action at this time.
0 commit comments