#include <net/socket_codes.h>
#include <net/in.h>
#include <net/in6.h>
#include <net/inet.h>
#include <errno.h>
#include <byteorder.h>
Go to the source code of this file.
Socket application programming interface | |
int | accept (int socket_id, struct sockaddr *cliaddr, socklen_t *addrlen) |
Accepts waiting socket. | |
int | bind (int socket_id, const struct sockaddr *my_addr, socklen_t addrlen) |
Binds the socket to a port address. | |
int | closesocket (int socket_id) |
Closes the socket. | |
int | connect (int socket_id, const struct sockaddr *serv_addr, socklen_t addrlen) |
Connects socket to the remote server. | |
int | getsockopt (int socket_id, int level, int optname, void *value, size_t *optlen) |
Gets socket option. | |
int | listen (int socket_id, int backlog) |
Sets the number of connections waiting to be accepted. | |
ssize_t | recv (int socket_id, void *data, size_t datalength, int flags) |
Receives data via the socket. | |
ssize_t | recvfrom (int socket_id, void *data, size_t datalength, int flags, struct sockaddr *fromaddr, socklen_t *addrlen) |
Receives data via the socket. | |
int | send (int socket_id, void *data, size_t datalength, int flags) |
Sends data via the socket. | |
int | sendto (int socket_id, const void *data, size_t datalength, int flags, const struct sockaddr *toaddr, socklen_t addrlen) |
Sends data via the socket to the remote address. | |
int | setsockopt (int socket_id, int level, int optname, const void *value, size_t optlen) |
Sets socket option. | |
int | socket (int domain, int type, int protocol) |
Creates a new socket. |
This is a part of the network application library. Based on the BSD socket interface.
Definition in file socket.h.