Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion tokio/src/net/tcp/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ impl TcpSocket {
///
/// [`set_linger`]: TcpSocket::set_linger
pub fn linger(&self) -> io::Result<Option<Duration>> {
self.inner.get_linger()
self.inner.linger()
}

/// Gets the local address of this socket.
Expand Down Expand Up @@ -409,6 +409,11 @@ impl TcpSocket {
.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.
///
/// This calls the `bind(2)` operating-system function. Behavior is
Expand Down