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/latest/x86_64-pc-windows-msvc/rustix/net/fn.wsa_startup.html
8 //! [`wsa_cleanup`]: https://docs.rs/rustix/latest/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")))]
25 recv
, recvfrom
, send
, sendto
, sendto_any
, sendto_v4
, sendto_v6
, RecvFlags
, SendFlags
,
28 accept
, accept_with
, acceptfrom
, acceptfrom_with
, bind
, bind_any
, bind_v4
, bind_v6
, connect
,
29 connect_any
, connect_v4
, connect_v6
, getpeername
, getsockname
, listen
, shutdown
, socket
,
30 socket_with
, AcceptFlags
, AddressFamily
, Protocol
, Shutdown
, SocketFlags
, SocketType
,
32 pub use socket_addr_any
::{SocketAddrAny, SocketAddrStorage}
;
33 #[cfg(not(any(windows, target_os = "wasi")))]
34 pub use socketpair
::socketpair
;
35 #[cfg(feature = "std")]
36 pub use std
::net
::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6}
;
38 pub use wsa
::{wsa_cleanup, wsa_startup}
;
39 #[cfg(not(feature = "std"))]
41 addr
::{SocketAddr, SocketAddrV4, SocketAddrV6}
,
42 ip
::{IpAddr, Ipv4Addr, Ipv6Addr, Ipv6MulticastScope}
,
46 send_recv
::sendto_unix
,
47 socket
::{bind_unix, connect_unix, SocketAddrUnix}
,