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

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

References