|
gwenhywfar 5.14.1
|
#include "./endpoint_ipc.h"#include "./endpoint_msgio.h"#include "./endpoint_tcpc.h"#include "./msg_ipc.h"#include <gwenhywfar/debug.h>
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_ENDPOINT * | GWEN_IpcEndpoint_CreateIpcTcpClient (const char *host, int port, const char *name, int groupId) |
| GWEN_MSG_ENDPOINT * | GWEN_IpcEndpoint_CreateIpcTcpServiceForSocket (GWEN_SOCKET *sk, const char *name, int groupId) |
| void | GWEN_IpcEndpoint_Extend (GWEN_MSG_ENDPOINT *ep) |
| #define GWEN_MSG_ENDPOINT_IPC_NAME "ipc" |
Definition at line 24 of file endpoint_ipc.c.
Referenced by GWEN_IpcEndpoint_CreateIpcTcpClient(), and GWEN_IpcEndpoint_CreateIpcTcpServiceForSocket().
|
static |
| 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(), GWEN_MSGIPC_OFFS_PAYLOAD, and GWEN_UNUSED.

| 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().

| 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().

| 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().

