Lines Matching defs:socket
19 /// `socket(domain, type_, protocol)`—Creates a socket.
21 /// POSIX guarantees that `socket` will use the lowest unused file descriptor,
33 /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/socket.html
34 /// [Linux]: https://man7.org/linux/man-pages/man2/socket.2.html
35 /// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/socket.2.html
36 /// [Winsock2]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-socket
38 pub fn socket(domain: AddressFamily, type_: SocketType, protocol: Protocol) -> io::Result<OwnedFd> {
39 backend::net::syscalls::socket(domain, type_, protocol)
42 /// `socket_with(domain, type_ | flags, protocol)`—Creates a socket, with
45 /// POSIX guarantees that `socket` will use the lowest unused file descriptor,
49 /// `socket_with` is the same as [`socket`] but adds an additional flags
58 /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/socket.html
59 /// [Linux]: https://man7.org/linux/man-pages/man2/socket.2.html
60 /// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/socket.2.html
61 /// [Winsock2]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-socket
72 /// `bind(sockfd, addr)`—Binds a socket to an IP address.
95 /// `bind(sockfd, addr)`—Binds a socket to an address.
121 /// `bind(sockfd, addr, sizeof(struct sockaddr_in))`—Binds a socket to an
140 /// `bind(sockfd, addr, sizeof(struct sockaddr_in6))`—Binds a socket to an
159 /// `bind(sockfd, addr, sizeof(struct sockaddr_un))`—Binds a socket to a
408 /// `getsockname(fd, addr, len)`—Returns the address a socket is bound to.
425 /// `getpeername(fd, addr, len)`—Returns the address a socket is connected