mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-28 12:10:37 +00:00
net: implement AsRawSocket on Windows (#2911)
This commit is contained in:
parent
242ea01189
commit
561a71ad63
@ -431,14 +431,12 @@ mod sys {
|
|||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
mod sys {
|
mod sys {
|
||||||
// TODO: let's land these upstream with mio and then we can add them here.
|
use super::TcpListener;
|
||||||
//
|
use std::os::windows::prelude::*;
|
||||||
// use std::os::windows::prelude::*;
|
|
||||||
// use super::{TcpListener;
|
impl AsRawSocket for TcpListener {
|
||||||
//
|
fn as_raw_socket(&self) -> RawSocket {
|
||||||
// impl AsRawHandle for TcpListener {
|
self.io.get_ref().as_raw_socket()
|
||||||
// fn as_raw_handle(&self) -> RawHandle {
|
}
|
||||||
// self.listener.io().as_raw_handle()
|
}
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
@ -596,14 +596,12 @@ mod sys {
|
|||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
mod sys {
|
mod sys {
|
||||||
// TODO: let's land these upstream with mio and then we can add them here.
|
use super::TcpStream;
|
||||||
//
|
use std::os::windows::prelude::*;
|
||||||
// use std::os::windows::prelude::*;
|
|
||||||
// use super::TcpStream;
|
impl AsRawSocket for TcpStream {
|
||||||
//
|
fn as_raw_socket(&self) -> RawSocket {
|
||||||
// impl AsRawHandle for TcpStream {
|
self.io.get_ref().as_raw_socket()
|
||||||
// fn as_raw_handle(&self) -> RawHandle {
|
}
|
||||||
// self.io.get_ref().as_raw_handle()
|
}
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
@ -356,14 +356,12 @@ mod sys {
|
|||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
mod sys {
|
mod sys {
|
||||||
// TODO: let's land these upstream with mio and then we can add them here.
|
use super::UdpSocket;
|
||||||
//
|
use std::os::windows::prelude::*;
|
||||||
// use std::os::windows::prelude::*;
|
|
||||||
// use super::UdpSocket;
|
impl AsRawSocket for UdpSocket {
|
||||||
//
|
fn as_raw_socket(&self) -> RawSocket {
|
||||||
// impl AsRawHandle for UdpSocket {
|
self.io.get_ref().as_raw_socket()
|
||||||
// fn as_raw_handle(&self) -> RawHandle {
|
}
|
||||||
// self.io.get_ref().as_raw_handle()
|
}
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user