23 #ifndef __LSCP_SOCKET_H 24 #define __LSCP_SOCKET_H 32 #include <sys/socket.h> 33 #include <netinet/in.h> 34 #include <netinet/tcp.h> 35 #include <arpa/inet.h> 39 #if defined(__cplusplus) 48 typedef int socklen_t;
51 #define INVALID_SOCKET -1 52 #define SOCKET_ERROR -1 53 #define closesocket(s) close(s) 56 #define LSCP_BUFSIZ 1024 62 void lscp_socket_trace (
const char *pszPrefix,
struct sockaddr_in *pAddr,
const char *pchBuffer,
int cchBuffer);
82 #if defined(__cplusplus) 87 #endif // __LSCP_SOCKET_H int iState
Definition: socket.h:73
void lscp_socket_herror(const char *pszPrefix)
Definition: socket.c:119
lscp_status_t lscp_socket_agent_start(lscp_socket_agent_t *pAgent, lscp_thread_proc_t pfnProc, void *pvData, int iDetach)
Definition: socket.c:211
lscp_status_t lscp_socket_agent_join(lscp_socket_agent_t *pAgent)
Definition: socket.c:225
enum _lscp_status_t lscp_status_t
void(* lscp_thread_proc_t)(void *pvData)
Definition: thread.h:101
lscp_thread_t * pThread
Definition: socket.h:72
struct _lscp_socket_agent_t lscp_socket_agent_t
lscp_status_t lscp_socket_agent_free(lscp_socket_agent_t *pAgent)
Definition: socket.c:236
void lscp_socket_getopts(const char *pszPrefix, lscp_socket_t sock)
Definition: socket.c:153
struct sockaddr_in addr
Definition: socket.h:71
void lscp_socket_agent_init(lscp_socket_agent_t *pAgent, lscp_socket_t sock, struct sockaddr_in *pAddr, int cAddr)
Definition: socket.c:198
void lscp_socket_trace(const char *pszPrefix, struct sockaddr_in *pAddr, const char *pchBuffer, int cchBuffer)
Definition: socket.c:170
lscp_socket_t sock
Definition: socket.h:70
void lscp_socket_perror(const char *pszPrefix)
Definition: socket.c:114
int lscp_socket_t
Definition: socket.h:50