Debian Codegraph @

debian/missing-sources/rustix/src/net/mod.rs

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