#include "lscp/thread.h"
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>
Go to the source code of this file.
Data Structures | |
struct | _lscp_socket_agent_t |
Defines | |
#define | INVALID_SOCKET -1 |
#define | SOCKET_ERROR -1 |
#define | closesocket(s) close(s) |
#define | LSCP_BUFSIZ 1024 |
Typedefs | |
typedef int | lscp_socket_t |
typedef struct _lscp_socket_agent_t | lscp_socket_agent_t |
Functions | |
void | lscp_socket_perror (const char *pszPrefix) |
void | lscp_socket_herror (const char *pszPrefix) |
void | lscp_socket_getopts (const char *pszPrefix, lscp_socket_t sock) |
void | lscp_socket_trace (const char *pszPrefix, struct sockaddr_in *pAddr, const char *pchBuffer, int cchBuffer) |
void | lscp_socket_agent_init (lscp_socket_agent_t *pAgent, lscp_socket_t sock, struct sockaddr_in *pAddr, int cAddr) |
lscp_status_t | lscp_socket_agent_start (lscp_socket_agent_t *pAgent, lscp_thread_proc_t pfnProc, void *pvData, int iDetach) |
lscp_status_t | lscp_socket_agent_join (lscp_socket_agent_t *pAgent) |
lscp_status_t | lscp_socket_agent_free (lscp_socket_agent_t *pAgent) |
#define closesocket | ( | s | ) | close(s) |
Referenced by lscp_client_create(), lscp_server_create_ex(), and lscp_socket_agent_free().
#define INVALID_SOCKET -1 |
Referenced by lscp_client_call(), lscp_client_create(), lscp_server_create_ex(), and lscp_socket_agent_free().
#define LSCP_BUFSIZ 1024 |
Referenced by lscp_server_broadcast(), and lscp_set_fxsend_name().
#define SOCKET_ERROR -1 |
Referenced by lscp_client_create(), and lscp_server_create_ex().
typedef struct _lscp_socket_agent_t lscp_socket_agent_t |
typedef int lscp_socket_t |
lscp_status_t lscp_socket_agent_free | ( | lscp_socket_agent_t * | pAgent | ) |
void lscp_socket_agent_init | ( | lscp_socket_agent_t * | pAgent, | |
lscp_socket_t | sock, | |||
struct sockaddr_in * | pAddr, | |||
int | cAddr | |||
) |
References _lscp_socket_agent_t::addr, _lscp_socket_agent_t::iState, _lscp_socket_agent_t::pThread, and _lscp_socket_agent_t::sock.
Referenced by lscp_client_create(), and lscp_server_create_ex().
lscp_status_t lscp_socket_agent_join | ( | lscp_socket_agent_t * | pAgent | ) |
References lscp_thread_join(), and _lscp_socket_agent_t::pThread.
Referenced by lscp_client_join(), and lscp_server_join().
lscp_status_t lscp_socket_agent_start | ( | lscp_socket_agent_t * | pAgent, | |
lscp_thread_proc_t | pfnProc, | |||
void * | pvData, | |||
int | iDetach | |||
) |
References _lscp_socket_agent_t::iState, LSCP_FAILED, LSCP_OK, lscp_thread_create(), lscp_thread_destroy(), and _lscp_socket_agent_t::pThread.
Referenced by lscp_server_create_ex().
void lscp_socket_getopts | ( | const char * | pszPrefix, | |
lscp_socket_t | sock | |||
) |
Referenced by lscp_client_create(), and lscp_server_create_ex().
void lscp_socket_herror | ( | const char * | pszPrefix | ) |
Referenced by lscp_client_create().
void lscp_socket_perror | ( | const char * | pszPrefix | ) |
Referenced by lscp_client_call(), lscp_client_create(), lscp_client_recv(), lscp_server_create_ex(), and lscp_server_result().
void lscp_socket_trace | ( | const char * | pszPrefix, | |
struct sockaddr_in * | pAddr, | |||
const char * | pchBuffer, | |||
int | cchBuffer | |||
) |
Referenced by server_callback().