Struct socket2::Domain [−][src]
pub struct Domain(_);
Specification of the communication domain for a socket.
This is a newtype wrapper around an integer which provides a nicer API in
addition to an injection point for documentation. Convenience constants such
as Domain::IPV4, Domain::IPV6, etc, are provided to avoid reaching
into libc for various constants.
This type is freely interconvertible with C’s int type, however, if a raw
value needs to be provided.
Implementations
impl Domain[src]
impl Domain[src]Unix only API.
pub const UNIX: Domain[src]
Domain for Unix socket communication, corresponding to AF_UNIX.
pub const PACKET: Domain[src]
Domain for low-level packet interface, corresponding to AF_PACKET.
Notes
This function is only available on Fuchsia and Linux.
pub const VSOCK: Domain[src]
Domain for low-level VSOCK interface, corresponding to AF_VSOCK.
Notes
This function is only available on Linux.
impl Domain[src]
impl Domain[src]pub const IPV4: Domain[src]
Domain for IPv4 communication, corresponding to AF_INET.
pub const IPV6: Domain[src]
Domain for IPv6 communication, corresponding to AF_INET6.
pub const fn for_address(address: SocketAddr) -> Domain[src]
Returns the correct domain for address.