| 1 |
use std::io; |
| 2 |
use std::net::{self, SocketAddr}; |
| 3 |
|
| 4 |
#[cfg(not(target_os = "wasi"))] |
| 5 |
pub(crate) fn new_for_addr(_: SocketAddr) -> io::Result<i32> { |
| 6 |
os_required!(); |
| 7 |
} |
| 8 |
|
| 9 |
#[cfg(not(target_os = "wasi"))] |
| 10 |
pub(crate) fn bind(_: &net::TcpListener, _: SocketAddr) -> io::Result<()> { |
| 11 |
os_required!(); |
| 12 |
} |
| 13 |
|
| 14 |
#[cfg(not(target_os = "wasi"))] |
| 15 |
pub(crate) fn connect(_: &net::TcpStream, _: SocketAddr) -> io::Result<()> { |
| 16 |
os_required!(); |
| 17 |
} |
| 18 |
|
| 19 |
#[cfg(not(target_os = "wasi"))] |
| 20 |
pub(crate) fn listen(_: &net::TcpListener, _: i32) -> io::Result<()> { |
| 21 |
os_required!(); |
| 22 |
} |
| 23 |
|
| 24 |
#[cfg(any(unix, target_os = "hermit"))] |
| 25 |
pub(crate) fn set_reuseaddr(_: &net::TcpListener, _: bool) -> io::Result<()> { |
| 26 |
os_required!(); |
| 27 |
} |
| 28 |
|
| 29 |
pub(crate) fn accept(_: &net::TcpListener) -> io::Result<(net::TcpStream, SocketAddr)> { |
| 30 |
os_required!(); |
| 31 |
} |