@@ -7,7 +7,7 @@ use unix_socket::UnixStream;
77#[ cfg( unix) ]
88use std:: os:: unix:: io:: { AsRawFd , RawFd } ;
99#[ cfg( windows) ]
10- use std:: os:: windows:: io:: { AsRawHandle , RawHandle } ;
10+ use std:: os:: windows:: io:: { AsRawSocket , RawSocket } ;
1111
1212use { SslMode , ConnectError , ConnectParams , ConnectTarget } ;
1313use io:: { NegotiateSsl , StreamWrapper } ;
@@ -19,7 +19,7 @@ const DEFAULT_PORT: u16 = 5432;
1919/// A connection to the Postgres server.
2020///
2121/// It implements `Read`, `Write` and `StreamWrapper`, as well as `AsRawFd` on
22- /// Unix platforms and `AsRawHandle ` on Windows platforms.
22+ /// Unix platforms and `AsRawSocket ` on Windows platforms.
2323pub struct Stream ( InternalStream ) ;
2424
2525impl Read for Stream {
@@ -60,11 +60,11 @@ impl AsRawFd for Stream {
6060}
6161
6262#[ cfg( windows) ]
63- impl AsRawHandle for Stream {
64- fn as_raw_handle ( & self ) -> RawHandle {
63+ impl AsRawSocket for Stream {
64+ fn as_raw_socket ( & self ) -> RawSocket {
6565 // Unix sockets aren't supported on windows, so no need to match
6666 match self . 0 {
67- InternalStream :: Tcp ( ref s) => s. as_raw_handle ( ) ,
67+ InternalStream :: Tcp ( ref s) => s. as_raw_socket ( ) ,
6868 }
6969 }
7070}
0 commit comments