summaryrefslogtreecommitdiffstats
path: root/tokio/src/net/tcp/stream.rs
diff options
context:
space:
mode:
authorTaiki Endo <te316e89@gmail.com>2020-10-06 02:22:19 +0900
committerGitHub <noreply@github.com>2020-10-05 10:22:19 -0700
commit561a71ad63e5e9fde7900c700596952372e4c5ac (patch)
tree453a0a076ef8f7183541a4d585cba0f93c911ceb /tokio/src/net/tcp/stream.rs
parent242ea011891099f348b755b2ea10ec9e9ea104db (diff)
net: implement AsRawSocket on Windows (#2911)
Diffstat (limited to 'tokio/src/net/tcp/stream.rs')
-rw-r--r--tokio/src/net/tcp/stream.rs18
1 files changed, 8 insertions, 10 deletions
diff --git a/tokio/src/net/tcp/stream.rs b/tokio/src/net/tcp/stream.rs
index 50536e98..9141d981 100644
--- a/tokio/src/net/tcp/stream.rs
+++ b/tokio/src/net/tcp/stream.rs
@@ -596,14 +596,12 @@ mod sys {
#[cfg(windows)]
mod sys {
- // TODO: let's land these upstream with mio and then we can add them here.
- //
- // use std::os::windows::prelude::*;
- // use super::TcpStream;
- //
- // impl AsRawHandle for TcpStream {
- // fn as_raw_handle(&self) -> RawHandle {
- // self.io.get_ref().as_raw_handle()
- // }
- // }
+ use super::TcpStream;
+ use std::os::windows::prelude::*;
+
+ impl AsRawSocket for TcpStream {
+ fn as_raw_socket(&self) -> RawSocket {
+ self.io.get_ref().as_raw_socket()
+ }
+ }
}