Method lrs::socket::Socket::ipv6_set_ipv6_only

Sets whether this socket only handles Ipv6 packets.

Syntax

impl Socket {
    fn ipv6_set_ipv6_only(&self, val: bool) -> Result<(), Errno>
}

Arguments

NameDescription
val

Whether this socket only handles Ipv6 packets.

Remarks

If this option is set, then the socket will not send or receive Ipv4 packets. Otherwise, the kernel transparently translates between Ipv6 and Ipv4 packets for us. If this option is set, an Ipv4 and an Ipv6 socket can bind to the same port.

See also