1//! Network-related operations.
2//!
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
5//! no longer needed.
6//!
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
910pub mod addr;
11mod send_recv;
12mod socket;
13mod socket_addr_any;
14#[cfg(not(any(windows, target_os = "wasi")))]
15mod socketpair;
16mod types;
17#[cfg(windows)]
18mod wsa;
1920#[cfg(linux_kernel)]
21pub mod netdevice;
22pub mod sockopt;
2324pub use crate::maybe_polyfill::net::{
25 IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6,
26};
27pub use send_recv::*;
28pub use socket::*;
29pub use socket_addr_any::SocketAddrAny;
30pub(crate) use socket_addr_any::SocketAddrBuf;
31#[cfg(not(any(windows, target_os = "wasi")))]
32pub use socketpair::socketpair;
33pub use types::*;
34#[cfg(windows)]
35pub use wsa::{wsa_cleanup, wsa_startup};