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
9
10mod send_recv;
11mod socket;
12mod socket_addr_any;
13#[cfg(not(any(windows, target_os = "wasi")))]
14mod socketpair;
15mod types;
16#[cfg(windows)]
17mod wsa;
18
19#[cfg(linux_kernel)]
20pub mod netdevice;
21pub mod sockopt;
22
23pub use crate::maybe_polyfill::net::{
24 IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6,
25};
26pub use send_recv::*;
27pub use socket::*;
28pub use socket_addr_any::{SocketAddrAny, SocketAddrStorage};
29#[cfg(not(any(windows, target_os = "wasi")))]
30pub use socketpair::socketpair;
31pub use types::*;
32#[cfg(windows)]
33pub use wsa::{wsa_cleanup, wsa_startup};
34