1 //! Network-related operations.
3 //! On Windows, one must call [`wsa_startup`] in the process before calling any
4 //! of these APIs. [`wsa_cleanup`] may be used in the process if these APIs are
7 //! [`wsa_startup`]: https://docs.rs/rustix/*/x86_64-pc-windows-msvc/rustix/net/fn.wsa_startup.html
8 //! [`wsa_cleanup`]: https://docs.rs/rustix/*/x86_64-pc-windows-msvc/rustix/net/fn.wsa_cleanup.html
10 #[cfg(not(feature = "std"))]
12 #[cfg(not(feature = "std"))]
17 #[cfg(not(any(windows, target_os = "wasi")))]
26 pub use socket_addr_any
::{SocketAddrAny, SocketAddrStorage}
;
27 #[cfg(not(any(windows, target_os = "wasi")))]
28 pub use socketpair
::socketpair
;
29 #[cfg(feature = "std")]
30 pub use std
::net
::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6}
;
32 pub use wsa
::{wsa_cleanup, wsa_startup}
;
33 #[cfg(not(feature = "std"))]
35 addr
::{SocketAddr, SocketAddrV4, SocketAddrV6}
,
36 ip
::{IpAddr, Ipv4Addr, Ipv6Addr, Ipv6MulticastScope}
,
40 send_recv
::sendto_unix
,
41 socket
::{bind_unix, connect_unix, SocketAddrUnix}
,