![]() |
Samsung Internal API reference
2.0
|
Typedefs | |
| typedef int | socklen_t |
| A type of width of at least 32 bits representing lengths in socket subsystem. | |
Functions | |
| int | accept (int sockfd, struct sockaddr *addr, socklen_t *addrlen) |
| Accept a connection on a socket. More... | |
| int | bind (int sockfd, const struct sockaddr *addr, socklen_t addrlen) |
| Bind a name to a socket. More... | |
| int | connect (int sockfd, const struct sockaddr *addr, socklen_t addrlen) |
| Initiate a connection on a socket. More... | |
| int | getsockopt (int sockfd, int level, int optname, void *optval, socklen_t *optlen) |
| Get options on socket. More... | |
| int | setsockopt (int sockfd, int level, int optname, const void *optval, socklen_t optlen) |
| Set options on socket. More... | |
| int | listen (int sockfd, int backlog) |
| Listen for connections on a socket. More... | |
| int | socket (int socket_family, int socket_type, int protocol) |
| Create endpoint for communication. More... | |
| ssize_t | recv (int sockfd, void *buf, size_t len, int flags) |
| Receive a message from a socket. More... | |
| ssize_t | send (int sockfd, const void *buf, size_t len, int flags) |
| Send a message to a socket. More... | |
| int | socketpair (int socket_family, int socket_type, int protocol, int sv[2]) |
| Create a pair of connected sockets. More... | |
| ssize_t | recvmsg (int sockfd, struct msghdr *msg, int flags) |
| Receive multipple message on a socket. More... | |
| ssize_t | sendmsg (int sockfd, struct msghdr *msg, int flags) |
| Send multipple message on a socket. More... | |
| int accept | ( | int | sockfd, |
| struct sockaddr * | addr, | ||
| socklen_t * | addrlen | ||
| ) |
#include <sys/socket.h>
Accept a connection on a socket.
| [in] | sockfd | listening socket descriptor |
| [in] | addr | pointer to a sockaddr structure |
| [in,out] | addrlen | size of structure pointed to by addr |
| int bind | ( | int | sockfd, |
| const struct sockaddr * | addr, | ||
| socklen_t | addrlen | ||
| ) |
#include <sys/socket.h>
Bind a name to a socket.
| [in] | sockfd | socket descriptor |
| [in] | addr | address to the socket |
| [in] | addrlen | size of the address structure |
| int connect | ( | int | sockfd, |
| const struct sockaddr * | addr, | ||
| socklen_t | addrlen | ||
| ) |
#include <sys/socket.h>
Initiate a connection on a socket.
| [in] | sockfd | socket descriptor |
| [in] | addr | address to the socket |
| [in] | addrlen | size of the address structure |
| int getsockopt | ( | int | sockfd, |
| int | level, | ||
| int | optname, | ||
| void * | optval, | ||
| socklen_t * | optlen | ||
| ) |
#include <sys/socket.h>
Get options on socket.
| [in] | sockfd | socket descriptor |
| [in] | level | socket API level |
| [in] | optname | specified options |
| [in,out] | optval | buffer in which the value of the requested options are to be returned |
| [in,out] | optlen | the size of the buffer pointed to by optval |
| int listen | ( | int | sockfd, |
| int | backlog | ||
| ) |
#include <sys/socket.h>
Listen for connections on a socket.
| [in] | sockfd | socket descriptor |
| [in] | backlog | maximum length to which the queue of pending connections for sockfd may grow |
| ssize_t recv | ( | int | sockfd, |
| void * | buf, | ||
| size_t | len, | ||
| int | flags | ||
| ) |
#include <sys/socket.h>
Receive a message from a socket.
| [in] | sockfd | socket descriptor |
| [in] | buf | pointer to a message buffer |
| [in] | len | message length |
| [in] | flags | type of receiving |
| ssize_t recvmsg | ( | int | sockfd, |
| struct msghdr * | msg, | ||
| int | flags | ||
| ) |
#include <sys/socket.h>
Receive multipple message on a socket.
| [in] | sockfd | socket descriptor |
| [in] | msg | pointer to an array of msghdr structures |
| [in] | flags | type of receiving |
| ssize_t send | ( | int | sockfd, |
| const void * | buf, | ||
| size_t | len, | ||
| int | flags | ||
| ) |
#include <sys/socket.h>
Send a message to a socket.
| [in] | sockfd | socket descriptor |
| [in,out] | buf | pointer to a message buffer |
| [in] | len | message length |
| [in] | flags | type of sending |
| ssize_t sendmsg | ( | int | sockfd, |
| struct msghdr * | msg, | ||
| int | flags | ||
| ) |
#include <sys/socket.h>
Send multipple message on a socket.
| [in] | sockfd | socket descriptor |
| [out] | msg | pointer to an array of msghdr structures |
| [in] | flags | type of sending |
| int setsockopt | ( | int | sockfd, |
| int | level, | ||
| int | optname, | ||
| const void * | optval, | ||
| socklen_t | optlen | ||
| ) |
#include <sys/socket.h>
Set options on socket.
| [in] | sockfd | socket descriptor |
| [in] | level | socket API level |
| [in] | optname | specified options |
| [in] | optval | buffer in which the new value of the requested options is stored |
| [in] | optlen | the size of the buffer pointed to by optval |
| int socket | ( | int | socket_family, |
| int | socket_type, | ||
| int | protocol | ||
| ) |
#include <sys/socket.h>
Create endpoint for communication.
| [in] | socket_family | communication domain |
| [in] | socket_type | communication semantics specifier |
| [in] | protocol | particular protocol to be used with the socket |
| int socketpair | ( | int | socket_family, |
| int | socket_type, | ||
| int | protocol, | ||
| int | sv[2] | ||
| ) |
#include <sys/socket.h>
Create a pair of connected sockets.
| [in] | socket_family | communication domain |
| [in] | socket_type | communication semantics specifier |
| [in] | protocol | particular protocol to be used with the socket |
| [in] | sv | file descriptors |