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

Go to the source code of this file.

Macros

#define GWEN_ENDPOINT_TCPC_RECONNECT_TIME   5
 
#define GWEN_MSG_ENDPOINT_TCPC_NAME   "tcpclient"
 

Functions

static void _addSockets (GWEN_MSG_ENDPOINT *ep, GWEN_SOCKETSET *readSet, GWEN_SOCKETSET *writeSet, GWEN_SOCKETSET *xSet)
 
void _addSockets (GWEN_MSG_ENDPOINT *ep, GWEN_SOCKETSET *readSet, GWEN_SOCKETSET *writeSet, GWEN_UNUSED GWEN_SOCKETSET *xSet)
 
static void _checkSockets (GWEN_MSG_ENDPOINT *ep, GWEN_SOCKETSET *readSet, GWEN_SOCKETSET *writeSet, GWEN_SOCKETSET *xSet)
 
void _checkSockets (GWEN_MSG_ENDPOINT *ep, GWEN_UNUSED GWEN_SOCKETSET *readSet, GWEN_SOCKETSET *writeSet, GWEN_UNUSED 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 _startConnect (GWEN_MSG_ENDPOINT *ep)
 
GWEN_MSG_ENDPOINTGWEN_TcpcEndpoint_new (const char *host, int port, const char *name, int groupId)
 
int GWEN_TcpcEndpoint_StartConnect (GWEN_MSG_ENDPOINT *ep)
 

Macro Definition Documentation

◆ GWEN_ENDPOINT_TCPC_RECONNECT_TIME

#define GWEN_ENDPOINT_TCPC_RECONNECT_TIME   5

Definition at line 23 of file endpoint_tcpc.c.

Referenced by _addSockets().

◆ GWEN_MSG_ENDPOINT_TCPC_NAME

#define GWEN_MSG_ENDPOINT_TCPC_NAME   "tcpclient"

Definition at line 22 of file endpoint_tcpc.c.

Referenced by GWEN_TcpcEndpoint_new().

Function Documentation

◆ _addSockets() [1/2]

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

◆ _addSockets() [2/2]

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

◆ _checkSockets() [1/2]

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

Referenced by GWEN_TcpcEndpoint_new().

Here is the caller graph for this function:

◆ _checkSockets() [2/2]

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

◆ _createAndSetupAddress()

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

Definition at line 256 of file endpoint_tcpc.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 _startConnect().

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 231 of file endpoint_tcpc.c.

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

Referenced by _startConnect().

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_TcpcEndpoint_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 109 of file endpoint_tcpc.c.

References GWEN_FREE_OBJECT.

◆ _startConnect()

int _startConnect ( GWEN_MSG_ENDPOINT ep)
static

◆ GWEN_TcpcEndpoint_new()

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

◆ GWEN_TcpcEndpoint_StartConnect()

int GWEN_TcpcEndpoint_StartConnect ( GWEN_MSG_ENDPOINT ep)