File tree Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ autocfg = "1"
3636libc = " 0.2.77"
3737
3838[target .'cfg(windows)' .dependencies ]
39- winapi = { version = " 0.3.9 " , features = [" winsock2 " ] }
39+ windows-sys = { version = " 0.42 " , features = [" Win32_Networking_WinSock " ] }
4040
4141[dev-dependencies ]
4242async-channel = " 1"
Original file line number Diff line number Diff line change @@ -681,17 +681,10 @@ impl<T: AsRawSocket> Async<T> {
681681
682682 // Put the socket in non-blocking mode.
683683
684- use winapi:: ctypes;
685- use winapi:: um:: winsock2;
686-
687- let mut nonblocking = true as ctypes:: c_ulong ;
688- let res = unsafe {
689- winsock2:: ioctlsocket (
690- sock as winsock2:: SOCKET ,
691- winsock2:: FIONBIO ,
692- & mut nonblocking,
693- )
694- } ;
684+ use windows_sys:: Win32 :: Networking :: WinSock ;
685+
686+ let mut nonblocking = true as _ ;
687+ let res = unsafe { WinSock :: ioctlsocket ( sock as _ , WinSock :: FIONBIO , & mut nonblocking) } ;
695688 if res != 0 {
696689 return Err ( io:: Error :: last_os_error ( ) ) ;
697690 }
You can’t perform that action at this time.
0 commit comments