Function rustix::net::sockopt::set_socket_timeout

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

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

References