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 constructors
such as Domain::ipv4
, Domain::ipv6
, etc, are provided to avoid reaching
into libc for various constants.
This type is freely interconvertible with the i32
type, however, if a raw
value needs to be provided.
Methods
impl Domain
[src]
fn ipv4() -> Domain
[src]
Domain for IPv4 communication, corresponding to AF_INET
.
fn ipv6() -> Domain
[src]
Domain for IPv6 communication, corresponding to AF_INET6
.