doc.rust-lang.org
pub fn multicast_loop_v6(&self) -> io::Result<bool>
Gets the value of the IPV6_MULTICAST_LOOP option for this socket.
method
std
Stable since 1.9.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn multicast_loop_v4(&self) -> io::Result<bool>
Gets the value of the IP_MULTICAST_LOOP option for this socket.
method
std
Stable since 1.9.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn local_addr(&self) -> io::Result<SocketAddr>
Returns the socket address that this socket was created from.
method
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn leave_multicast_v6(&self, multiaddr: &Ipv6Addr, interface: u32) -> io::Result<()>
Executes an operation of the IPV6_DROP_MEMBERSHIP type.
method
std
Stable since 1.9.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn leave_multicast_v4(&self, multiaddr: &Ipv4Addr, interface: &Ipv4Addr) -> io::Result<()>
Executes an operation of the IP_DROP_MEMBERSHIP type.
method
std
Stable since 1.9.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn join_multicast_v6(&self, multiaddr: &Ipv6Addr, interface: u32) -> io::Result<()>
Executes an operation of the IPV6_ADD_MEMBERSHIP type.
method
std
Stable since 1.9.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn join_multicast_v4(&self, multiaddr: &Ipv4Addr, interface: &Ipv4Addr) -> io::Result<()>
Executes an operation of the IP_ADD_MEMBERSHIP type.
method
std
Stable since 1.9.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn connect<A>(&self, addr: A) -> io::Result<()>
Connects this UDP socket to a remote address, allowing the send and recv syscalls to be used to send data and also applies filters to only receive data from the specified address.
method
std
Stable since 1.9.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn broadcast(&self) -> io::Result<bool>
Gets the value of the SO_BROADCAST option for this socket.
method
std
Stable since 1.9.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn bind<A>(addr: A) -> io::Result<UdpSocket>
Creates a UDP socket from the given address.
associated_function
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct UdpSocket
A UDP socket.
struct
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn write_timeout(&self) -> io::Result<Option<Duration>>
Returns the write timeout of this socket.
method
std
Stable since 1.4.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn ttl(&self) -> io::Result<u32>
Gets the value of the IP_TTL option for this socket.
method
std
Stable since 1.9.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn try_clone(&self) -> io::Result<TcpStream>
Creates a new independently owned handle to the underlying socket.
method
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn take_error(&self) -> io::Result<Option<io::Error>>
Gets the value of the SO_ERROR option on this socket.
method
std
Stable since 1.9.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn shutdown(&self, how: Shutdown) -> io::Result<()>
Shuts down the read, write, or both halves of this connection.
method
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()>
Sets the write timeout to the timeout specified.
method
std
Stable since 1.4.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn set_ttl(&self, ttl: u32) -> io::Result<()>
Sets the value for the IP_TTL option on this socket.
method
std
Stable since 1.9.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()>
Sets the read timeout to the timeout specified.
method
std
Stable since 1.4.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn set_nonblocking(&self, nonblocking: bool) -> io::Result<()>
Moves this TCP stream into or out of nonblocking mode.
method
std
Stable since 1.9.0
Version 1.100.0-nightly