devela::_dep::rustix::net

Function connect_unspec

pub fn connect_unspec<Fd>(sockfd: Fd) -> Result<(), Errno> 
where Fd: AsFd,
Available on crate feature dep_rustix only.
Expand description

connect(sockfd, {.sa_family = AF_UNSPEC}, sizeof(struct sockaddr))— Dissolve the socket’s association.

On UDP sockets, BSD platforms report Errno::AFNOSUPPORT or Errno::INVAL even if the disconnect was successful.

§References