Re-exportsยง
use crate::ffi::c_int;๐use crate::ffi::c_void;๐use crate::io;๐use crate::io::BorrowedCursor;๐Experimental use crate::io::ErrorKind;๐use crate::io::IoSlice;๐use crate::io::IoSliceMut;๐use crate::mem::MaybeUninit;๐use crate::net::Ipv4Addr;๐use crate::net::Ipv6Addr;๐use crate::net::Shutdown;๐use crate::net::SocketAddr;๐use crate::net::SocketAddrV4;๐use crate::net::SocketAddrV6;๐use crate::net::ToSocketAddrs;๐use crate::sys::helpers::run_with_cstr;๐use crate::sys::net::connection::each_addr;๐use crate::sys::AsInner;๐use crate::sys::FromInner;๐use crate::time::Duration;๐use crate::cmp;๐use crate::fmt;๐use crate::mem;๐use crate::ptr;๐use netc as c;๐use c::IPV6_ADD_MEMBERSHIP;๐use c::IPV6_DROP_MEMBERSHIP;๐use libc::MSG_NOSIGNAL;๐pub use unix::*;
Modulesยง
- unix ๐
Structsยง
Constantsยง
- MAX_
SEND_ ๐LEN - SOCK_
NONBLOCK ๐ - Some systems support setting the nonblocking mode upon socket creation, which saves a syscall.
Functionsยง
- addr_
family ๐ - getsockoptโ
- Gets the value of a socket option.
- ip_
v4_ ๐addr_ from_ c - ip_
v4_ ๐addr_ to_ c - ip_
v6_ ๐addr_ from_ c - ip_
v6_ ๐addr_ to_ c - lookup_
host - setsockoptโ
- Sets the value of a socket option.
- socket_
addr_ ๐ โfrom_ c - Converts the C socket address stored in
storageto a RustSocketAddr. - socket_
addr_ ๐to_ c - socket_
addr_ ๐v4_ from_ c - socket_
addr_ ๐v4_ to_ c - socket_
addr_ ๐v6_ from_ c - socket_
addr_ ๐v6_ to_ c - sockname ๐ โ
- Wraps a call to a platform function that returns a socket address.
- to_
ipv6mr_ ๐interface Non-Android
Type Aliasesยง
- IpV4
Multi ๐Cast Type
Unionsยง
- Socket
AddrC ๐Repr - A type with the same memory layout as
c::sockaddr. Used in converting Rust level SocketAddr* types into their system representation. The benefit of this specific type over usingc::sockaddr_storageis that this type is exactly as large as it needs to be and not a lot larger. And it can be initialized more cleanly from Rust.