pub fn get_socket_type<Fd: AsFd>(fd: &Fd) -> io::Result<SocketType>
getsockopt(fd, SOL_SOCKET, SO_TYPE)—Returns the type of a socket.
getsockopt(fd, SOL_SOCKET, SO_TYPE)
getsockopt
sys/socket.h
socket
SOL_SOCKET