Trait net2::TcpListenerExt [] [src]

pub trait TcpListenerExt {
    fn set_ttl(&self, ttl: u32) -> Result<()>;
    fn ttl(&self) -> Result<u32>;
    fn set_only_v6(&self, only_v6: bool) -> Result<()>;
    fn only_v6(&self) -> Result<bool>;
}

Extension methods for the standard TcpListener type in std::net.

Required Methods

fn set_ttl(&self, ttl: u32) -> Result<()>

Sets the value for the IP_TTL option on this socket.

This is the same as TcpStreamExt::set_ttl.

fn ttl(&self) -> Result<u32>

Gets the value of the IP_TTL option for this socket.

For more information about this option, see TcpStreamExt::set_ttl.

fn set_only_v6(&self, only_v6: bool) -> Result<()>

Sets the value for the IPV6_V6ONLY option on this socket.

For more information about this option, see TcpStreamExt::set_only_v6.

fn only_v6(&self) -> Result<bool>

Gets the value of the IPV6_V6ONLY option for this socket.

For more information about this option, see TcpStreamExt::set_only_v6.

Implementors