sys/socket.h
|
int accept(int socket, struct sockaddr *address, socklen_t *address_len)
|
Accepts incoming connection requests.
|
sys/socket.h
|
int bind(int s, const struct sockaddr *name, socklen_t namelen)
|
Binds an IP address to a socket.
|
sys/socket.h
|
int shutdown(int socket, int how)
|
Shuts down a socket.
|
sys/socket.h
|
int getpeername(int s, struct sockaddr *name, socklen_t *namelen)
|
Retrieves the peer address of the specified socket.
|
sys/socket.h
|
int getsockname(int s, struct sockaddr *name, socklen_t *namelen)
|
Retrieves the local address of the specified socket.
|
sys/socket.h
|
int getsockopt(int s, struct sockaddr *name, socklen_t *namelen)
|
Retrieves the socket options.
|
sys/socket.h
|
int setsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen)
|
Sets the socket options.
|
unistd.h
|
int close(int s)
|
Closes a socket.
|
sys/socket.h
|
int connect(int s, const struct sockaddr *name, socklen_t namelen)
|
Initiates a connection to a socket.
|
sys/socket.h
|
int listen(int sockfd, int backlog)
|
Listens for network connections.
|
sys/socket.h
|
ssize_t recv(int socket, void *buffer, size_t length, int flags)
|
Receives data from another socket.
|
sys/socket.h
|
ssize_t recvmsg(int s, struct msghdr *message, int flags)
|
Receives data from a specified socket based on the input parameters.
|
sys/socket.h
|
ssize_t recvfrom(int socket, void *buffer, size_t length, int flags, struct sockaddr *address, socklen_t *address_len)
|
Receives data from a specified socket and obtains the IP address of the data source.
|
sys/socket.h
|
ssize_t send(int s, const void *dataptr, size_t size, int flags)
|
Sends data to another socket.
|
sys/socket.h
|
ssize_t sendmsg(int s, const struct msghdr *message, int flags)
|
Sends data to another socket based on the input parameters.
|
sys/socket.h
|
ssize_t sendto(int s, const void *dataptr, size_t size, int flags, const struct sockaddr *to, socklen_t tolen)
|
Sends data to another socket at the specified destination IP address.
|
sys/socket.h
|
int socket(int domain, int type, int protocol)
|
Creates a socket.
|
sys/select.h
|
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
|
Monitors the I/O events of multiple file descriptors.
|
sys/ioctl.h
|
int ioctl(int s, int request, ...)
|
Obtains and sets socket options.
|
arpa/inet.h
|
const char *inet_ntop(int af, const void *src, char *dst, socklen_t size)
|
Converts an IP address in binary format to a string.
|
arpa/inet.h
|
int inet_pton(int af, const char *src, void *dst)
|
Converts a string to an IP address in binary format.
|