# socket.h - [Overview](#section1503586833165629) - [Summary](#section1957135947165629) - [Data Structures](#nested-classes) - [Macros](#define-members) - [Functions](#func-members) ## **Overview** **Related Modules:** [NET](NET.md) **Description:** Declares functions and data structures related to network sockets. For example, you can use the functions to create and delete network sockets, listen to the network connection state, and send and receive network data. **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Data Structures
SHUT_RD 0 |
|
SHUT_WR 1 |
|
PF_INET 2 |
|
PF_INET6 10 |
|
SOCK_RAW 3 |
|
MSG_DONTWAIT 0x0040 |
|
MSG_NOSIGNAL 0x4000 |
|
MSG_MORE 0x8000 |
Defines the message type that more data is to be transferred. |
SO_TYPE 3 |
|
SO_RCVTIMEO 66 |
|
SO_SNDTIMEO 67 |
|
socket (int domain, int type, int protocol) |
|
shutdown (int sockfd, int how) |
|
bind (int sockfd, const struct sockaddr *addr, socklen_t addrlen) |
|
connect (int sockfd, const struct sockaddr *addr, socklen_t addrlen) |
|
listen (int sockfd, int backlog) |
|
accept (int sockfd, struct sockaddr *__restrict addr, socklen_t *__restrict addrlen) |
|
getsockname (int fd, struct sockaddr *restrict addr, socklen_t *restrict len) |
|
getpeername (int fd, struct sockaddr *restrict addr, socklen_t *restrict len) |
|
send (int fd, const void *buf, size_t len, int flags) |
|
recv (int fd, void *buf, size_t len, int flags) |
|
sendto (int fd, const void *buf, size_t len, int flags, const struct sockaddr *addr, socklen_t alen) |
|
recvfrom (int fd, void *__restrict buf, size_t len, int flags, struct sockaddr *__restrict addr, socklen_t *__restrict alen) |
|
sendmsg (int fd, const struct msghdr *msg, int flags) |
|
recvmsg (int fd, struct msghdr *msg, int flags) |
|
getsockopt (int fd, int level, int optname, void *__restrict optval, socklen_t *__restrict optlen) |
|
setsockopt (int fd, int level, int optname, const void *optval, socklen_t optlen) |