mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-10-01 12:20:39 +00:00
net: add TcpSocket::take_error
(#4364)
This commit is contained in:
parent
a9d9bde068
commit
96370ba4ce
@ -409,6 +409,11 @@ impl TcpSocket {
|
|||||||
.map(|addr| addr.as_socket().unwrap())
|
.map(|addr| addr.as_socket().unwrap())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns the value of the `SO_ERROR` option.
|
||||||
|
pub fn take_error(&self) -> io::Result<Option<io::Error>> {
|
||||||
|
self.inner.take_error()
|
||||||
|
}
|
||||||
|
|
||||||
/// Binds the socket to the given address.
|
/// Binds the socket to the given address.
|
||||||
///
|
///
|
||||||
/// This calls the `bind(2)` operating-system function. Behavior is
|
/// This calls the `bind(2)` operating-system function. Behavior is
|
||||||
|
Loading…
x
Reference in New Issue
Block a user