gwenhywfar  5.14.1
Macros | Functions
endpoint_tcpd.c File Reference
#include "./endpoint_tcpd_p.h"
#include <gwenhywfar/debug.h>
Include dependency graph for endpoint_tcpd.c:

Go to the source code of this file.

Macros

#define GWEN_MSG_ENDPOINT_TCPD_BACKLOG   10
 
#define GWEN_MSG_ENDPOINT_TCPD_NAME   "tcpcserver"
 

Functions

static void _addSockets (GWEN_MSG_ENDPOINT *ep, GWEN_SOCKETSET *readSet, GWEN_SOCKETSET *writeSet, GWEN_SOCKETSET *xSet)
 
static void _checkSockets (GWEN_MSG_ENDPOINT *ep, GWEN_SOCKETSET *readSet, GWEN_SOCKETSET *writeSet, GWEN_SOCKETSET *xSet)
 
static GWEN_INETADDRESS_createAndSetupAddress (const char *host, int port)
 
static GWEN_SOCKET_createAndSetupSocket (void)
 
static void GWENHYWFAR_CB _freeData (void *bp, void *p)
 
void GWENHYWFAR_CB _freeData (GWEN_UNUSED void *bp, void *p)
 
static int _startListen (GWEN_MSG_ENDPOINT *ep)
 
GWEN_MSG_ENDPOINTGWEN_TcpdEndpoint_new (const char *host, int port, const char *name, int groupId)
 
void GWEN_TcpdEndpoint_SetAcceptFn (GWEN_MSG_ENDPOINT *ep, GWEN_ENDPOINT_TCPD_ACCEPT_FN f, void *data)
 
int GWEN_TcpdEndpoint_StartListening (GWEN_MSG_ENDPOINT *ep)
 

Macro Definition Documentation

◆ GWEN_MSG_ENDPOINT_TCPD_BACKLOG

#define GWEN_MSG_ENDPOINT_TCPD_BACKLOG   10

Definition at line 23 of file endpoint_tcpd.c.

Referenced by _startListen().

◆ GWEN_MSG_ENDPOINT_TCPD_NAME

#define GWEN_MSG_ENDPOINT_TCPD_NAME   "tcpcserver"

Definition at line 22 of file endpoint_tcpd.c.

Referenced by GWEN_TcpdEndpoint_new().

Function Documentation

◆ _addSockets()

static void _addSockets ( GWEN_MSG_ENDPOINT ep,
GWEN_SOCKETSET readSet,
GWEN_SOCKETSET writeSet,
GWEN_SOCKETSET xSet 
)
static

◆ _checkSockets()

void _checkSockets ( GWEN_MSG_ENDPOINT ep,
GWEN_SOCKETSET readSet,
GWEN_SOCKETSET writeSet,
GWEN_SOCKETSET xSet 
)
static

◆ _createAndSetupAddress()

GWEN_INETADDRESS * _createAndSetupAddress ( const char *  host,
int  port 
)
static

Definition at line 300 of file endpoint_tcpd.c.

References DBG_INFO, GWEN_AddressFamilyIP, GWEN_InetAddr_free(), GWEN_InetAddr_new(), GWEN_InetAddr_SetAddress(), GWEN_InetAddr_SetName(), GWEN_InetAddr_SetPort(), GWEN_LOGDOMAIN, and NULL.

Referenced by _startListen().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _createAndSetupSocket()

GWEN_SOCKET * _createAndSetupSocket ( void  )
static

Definition at line 268 of file endpoint_tcpd.c.

References DBG_INFO, GWEN_LOGDOMAIN, GWEN_Socket_free(), GWEN_Socket_new(), GWEN_Socket_Open(), GWEN_Socket_SetBlocking(), GWEN_Socket_SetReuseAddress(), GWEN_SocketTypeTCP, and NULL.

Referenced by _startListen().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _freeData() [1/2]

static void GWENHYWFAR_CB _freeData ( void *  bp,
void *  p 
)
static

Referenced by GWEN_TcpdEndpoint_new().

Here is the caller graph for this function:

◆ _freeData() [2/2]

void GWENHYWFAR_CB _freeData ( GWEN_UNUSED void *  bp,
void *  p 
)

Definition at line 78 of file endpoint_tcpd.c.

References GWEN_FREE_OBJECT.

◆ _startListen()

int _startListen ( GWEN_MSG_ENDPOINT ep)
static

◆ GWEN_TcpdEndpoint_new()

GWEN_MSG_ENDPOINT* GWEN_TcpdEndpoint_new ( const char *  host,
int  port,
const char *  name,
int  groupId 
)

◆ GWEN_TcpdEndpoint_SetAcceptFn()

void GWEN_TcpdEndpoint_SetAcceptFn ( GWEN_MSG_ENDPOINT ep,
GWEN_ENDPOINT_TCPD_ACCEPT_FN  f,
void *  data 
)

Definition at line 90 of file endpoint_tcpd.c.

References GWEN_INHERIT_GETDATA.

◆ GWEN_TcpdEndpoint_StartListening()

int GWEN_TcpdEndpoint_StartListening ( GWEN_MSG_ENDPOINT ep)