File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
crates/shadowsocks/src/net Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -35,11 +35,11 @@ use futures::ready;
35
35
use tokio:: io:: Interest ;
36
36
use tokio:: { io:: ReadBuf , net:: ToSocketAddrs } ;
37
37
38
- use crate :: { ServerAddr , context:: Context , relay:: socks5:: Address } ;
38
+ use crate :: { context:: Context , relay:: socks5:: Address , ServerAddr } ;
39
39
40
40
use super :: {
41
- AcceptOpts , AddrFamily , ConnectOpts ,
42
41
sys:: { bind_outbound_udp_socket, create_inbound_udp_socket, create_outbound_udp_socket} ,
42
+ AcceptOpts , AddrFamily , ConnectOpts ,
43
43
} ;
44
44
45
45
/// Message struct for `batch_send`
@@ -414,3 +414,17 @@ impl std::os::fd::AsFd for UdpSocket {
414
414
self . socket . as_fd ( )
415
415
}
416
416
}
417
+
418
+ #[ cfg( windows) ]
419
+ impl std:: os:: windows:: io:: AsRawSocket for UdpSocket {
420
+ fn as_raw_socket ( & self ) -> std:: os:: windows:: io:: RawSocket {
421
+ self . socket . as_raw_socket ( )
422
+ }
423
+ }
424
+
425
+ #[ cfg( windows) ]
426
+ impl std:: os:: windows:: io:: AsSocket for UdpSocket {
427
+ fn as_socket ( & self ) -> std:: os:: windows:: io:: BorrowedSocket < ' _ > {
428
+ self . socket . as_socket ( )
429
+ }
430
+ }
You can’t perform that action at this time.
0 commit comments