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

Go to the source code of this file.

Macros

#define GWEN_MSG_ENDPOINT_IPC_NAME   "ipc"
 

Functions

static int _getBytesNeededForMessage (GWEN_MSG_ENDPOINT *ep, GWEN_MSG *msg)
 
int _getBytesNeededForMessage (GWEN_UNUSED GWEN_MSG_ENDPOINT *ep, GWEN_MSG *msg)
 
GWEN_MSG_ENDPOINTGWEN_IpcEndpoint_CreateIpcTcpClient (const char *host, int port, const char *name, int groupId)
 
GWEN_MSG_ENDPOINTGWEN_IpcEndpoint_CreateIpcTcpServiceForSocket (GWEN_SOCKET *sk, const char *name, int groupId)
 
void GWEN_IpcEndpoint_Extend (GWEN_MSG_ENDPOINT *ep)
 

Macro Definition Documentation

◆ GWEN_MSG_ENDPOINT_IPC_NAME

#define GWEN_MSG_ENDPOINT_IPC_NAME   "ipc"

Function Documentation

◆ _getBytesNeededForMessage() [1/2]

static int _getBytesNeededForMessage ( GWEN_MSG_ENDPOINT ep,
GWEN_MSG msg 
)
static

Referenced by GWEN_IpcEndpoint_Extend().

Here is the caller graph for this function:

◆ _getBytesNeededForMessage() [2/2]

int _getBytesNeededForMessage ( GWEN_UNUSED GWEN_MSG_ENDPOINT ep,
GWEN_MSG msg 
)

Definition at line 51 of file endpoint_ipc.c.

References DBG_DEBUG, GWEN_IpcMsg_GetMsgSize(), GWEN_LOGDOMAIN, GWEN_Msg_GetBytesInBuffer(), and GWEN_MSGIPC_OFFS_PAYLOAD.

Here is the call graph for this function:

◆ GWEN_IpcEndpoint_CreateIpcTcpClient()

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

Create a IPC client which works over a TCP connection.

Definition at line 70 of file endpoint_ipc.c.

References GWEN_IpcEndpoint_Extend(), GWEN_MSG_ENDPOINT_IPC_NAME, GWEN_MsgIoEndpoint_Extend(), and GWEN_TcpcEndpoint_new().

Here is the call graph for this function:

◆ GWEN_IpcEndpoint_CreateIpcTcpServiceForSocket()

GWEN_MSG_ENDPOINT* GWEN_IpcEndpoint_CreateIpcTcpServiceForSocket ( GWEN_SOCKET sk,
const char *  name,
int  groupId 
)

Create a IPC service for the given socket which works over a TCP connection. The given socket is expected to be created by accepting an incoming connection (e.g. from the callback function GWEN_ENDPOINT2_TCPD_ACCEPT_FN).

Definition at line 82 of file endpoint_ipc.c.

References GWEN_IpcEndpoint_Extend(), GWEN_MSG_ENDPOINT_IPC_NAME, GWEN_MsgEndpoint_new(), GWEN_MsgEndpoint_SetSocket(), and GWEN_MsgIoEndpoint_Extend().

Here is the call graph for this function:

◆ GWEN_IpcEndpoint_Extend()

void GWEN_IpcEndpoint_Extend ( GWEN_MSG_ENDPOINT ep)

Extends the given endpoint to support GWEN IPC messages. It expects the function GWEN_MsgIoEndpoint2_Extend() to have been called beforehand.

Definition at line 42 of file endpoint_ipc.c.

References _getBytesNeededForMessage(), and GWEN_MsgIoEndpoint_SetGetNeededBytesFn().

Referenced by GWEN_IpcEndpoint_CreateIpcTcpClient(), and GWEN_IpcEndpoint_CreateIpcTcpServiceForSocket().

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