Module socket
Source pub use crate::net::AddressFamily;pub use crate::net::Protocol;pub use crate::net::Shutdown;pub use crate::net::SocketFlags;pub use crate::net::SocketType;pub use backend::net::addr::SocketAddrUnix;
- accept
accept(fd, NULL, NULL)—Accepts an incoming connection.- accept_with
accept4(fd, NULL, NULL, flags)—Accepts an incoming connection, with
flags.- acceptfrom
accept(fd, &addr, &len)—Accepts an incoming connection and returns the
peer address.- acceptfrom_with
accept4(fd, &addr, &len, flags)—Accepts an incoming connection and
returns the peer address, with flags.- bind
bind(sockfd, addr)—Binds a socket to an IP address.- connect
connect(sockfd, addr)—Initiates a connection to an IP address.- connect_unspec
connect(sockfd, {.sa_family = AF_UNSPEC}, sizeof(struct sockaddr))—
Dissolve the socket’s association.- getpeername
getpeername(fd, addr, len)—Returns the address a socket is connected
to.- getsockname
getsockname(fd, addr, len)—Returns the address a socket is bound to.- listen
listen(fd, backlog)—Enables listening for incoming connections.- shutdown
shutdown(fd, how)—Closes the read and/or write sides of a stream.- socket
socket(domain, type_, protocol)—Creates a socket.- socket_with
socket_with(domain, type_ | flags, protocol)—Creates a socket, with
flags.