[−][src]Trait net2::TcpListenerExt
Extension methods for the standard TcpListener
type in std::net
.
Required methods
pub fn set_ttl(&self, ttl: u32) -> Result<()>
[src]
Sets the value for the IP_TTL
option on this socket.
This is the same as TcpStreamExt::set_ttl
.
pub fn ttl(&self) -> Result<u32>
[src]
Gets the value of the IP_TTL
option for this socket.
For more information about this option, see
TcpStreamExt::set_ttl
.
pub fn set_only_v6(&self, only_v6: bool) -> Result<()>
[src]
Sets the value for the IPV6_V6ONLY
option on this socket.
For more information about this option, see
TcpStreamExt::set_only_v6
.
pub fn only_v6(&self) -> Result<bool>
[src]
Gets the value of the IPV6_V6ONLY
option for this socket.
For more information about this option, see
TcpStreamExt::set_only_v6
.
pub fn take_error(&self) -> Result<Option<Error>>
[src]
Get the value of the SO_ERROR
option on this socket.
This will retrieve the stored error in the underlying socket, clearing the field in the process. This can be useful for checking errors between calls.
pub fn set_nonblocking(&self, nonblocking: bool) -> Result<()>
[src]
Moves this TCP listener into or out of nonblocking mode.
For more information about this option, see
TcpStreamExt::set_nonblocking
.
pub fn set_linger(&self, dur: Option<Duration>) -> Result<()>
[src]
Sets the linger duration of this socket by setting the SO_LINGER option
pub fn linger(&self) -> Result<Option<Duration>>
[src]
reads the linger duration for this socket by getting the SO_LINGER option