Module rustix::net::socket

source ·

Re-exports§

Functions§

  • _bind 🔒
  • _bind_any 🔒
  • _connect 🔒
  • accept(fd, NULL, NULL)—Accepts an incoming connection.
  • accept4(fd, NULL, NULL, flags)—Accepts an incoming connection, with flags.
  • accept(fd, &addr, &len)—Accepts an incoming connection and returns the peer address.
  • accept4(fd, &addr, &len, flags)—Accepts an incoming connection and returns the peer address, with flags.
  • bind(sockfd, addr)—Binds a socket to an IP address.
  • bind(sockfd, addr)—Binds a socket to an address.
  • bind(sockfd, addr, sizeof(struct sockaddr_un))—Binds a socket to a Unix-domain address.
  • bind(sockfd, addr, sizeof(struct sockaddr_in))—Binds a socket to an IPv4 address.
  • bind(sockfd, addr, sizeof(struct sockaddr_in6))—Binds a socket to an IPv6 address.
  • bind(sockfd, addr, sizeof(struct sockaddr_un))—Binds a socket to a XDP address.
  • connect(sockfd, addr)—Initiates a connection to an IP address.
  • connect(sockfd, addr)—Initiates a connection.
  • connect(sockfd, addr, sizeof(struct sockaddr_un))—Initiates a connection to a Unix-domain address.
  • connect(sockfd, {.sa_family = AF_UNSPEC}, sizeof(struct sockaddr))— Dissolve the socket’s association.
  • connect(sockfd, addr, sizeof(struct sockaddr_in))—Initiates a connection to an IPv4 address.
  • connect(sockfd, addr, sizeof(struct sockaddr_in6))—Initiates a connection to an IPv6 address.
  • getpeername(fd, addr, len)—Returns the address a socket is connected to.
  • getsockname(fd, addr, len)—Returns the address a socket is bound to.
  • listen(fd, backlog)—Enables listening for incoming connections.
  • shutdown(fd, how)—Closes the read and/or write sides of a stream.
  • socket(domain, type_, protocol)—Creates a socket.
  • socket_with(domain, type_ | flags, protocol)—Creates a socket, with flags.