pub fn set_socket_timeout<Fd: AsFd>(
    fd: Fd,
    id: Timeout,
    value: Option<Duration>
) -> Result<()>
Expand description

setsockopt(fd, SOL_SOCKET, id, value)—Set the sending or receiving timeout.

See the module-level documentation for more.