|
gwenhywfar 5.14.1
|
#include <gwenhywfar/endpoint.h>#include <time.h>

Go to the source code of this file.
Typedefs | |
| typedef int(* | GWEN_ENDPOINT_MSGIO_GETBYTESNEEDED_FN) (GWEN_MSG_ENDPOINT *ep, GWEN_MSG *msg) |
| typedef void(* | GWEN_ENDPOINT_MSGIO_SENDMSGFINISH_FN) (GWEN_MSG_ENDPOINT *ep, GWEN_MSG *msg) |
| typedef int(* | GWEN_ENDPOINT_MSGIO_SENDMSGSTART_FN) (GWEN_MSG_ENDPOINT *ep, GWEN_MSG *msg) |
| typedef int(* GWEN_ENDPOINT_MSGIO_GETBYTESNEEDED_FN) (GWEN_MSG_ENDPOINT *ep, GWEN_MSG *msg) |
This defines a callback function to be used to determine how many bytes a message still needs to receive to complete a message. The function should return exactly 0 if the message is complete (i.e. doesn't need more bytes) and negative values on error. All positive values >0 define how many bytes the given message still needs to be complete.
This function is called multiple times per message until it returns 0 (signalling that the message is complete) or a negative value (signalling an error).
Definition at line 33 of file endpoint_msgio.h.
| typedef void(* GWEN_ENDPOINT_MSGIO_SENDMSGFINISH_FN) (GWEN_MSG_ENDPOINT *ep, GWEN_MSG *msg) |
Definition at line 37 of file endpoint_msgio.h.
| typedef int(* GWEN_ENDPOINT_MSGIO_SENDMSGSTART_FN) (GWEN_MSG_ENDPOINT *ep, GWEN_MSG *msg) |
Definition at line 36 of file endpoint_msgio.h.
| GWENHYWFAR_API void GWEN_MsgIoEndpoint_Extend | ( | GWEN_MSG_ENDPOINT * | ep | ) |
Create a base class for message based endpoints (which are basically all endpoints). It contains code to automatically read and write messages from/to the internal queues (see GWEN_MsgEndpoint_GetReceivedMessageList and GWEN_MsgEndpoint_GetSendMessageList).
For this class to work with every type of message protocol a callback must be set via GWEN_MsgIoEndpoint_SetGetNeededBytesFn.
Definition at line 51 of file endpoint_msgio.c.
References _addSockets(), _checkSockets(), _freeData(), GWEN_INHERIT_SETDATA, GWEN_MsgEndpoint_SetAddSocketsFn(), GWEN_MsgEndpoint_SetCheckSocketsFn(), GWEN_MsgIoEndpoint_Extend(), and GWEN_NEW_OBJECT.
Referenced by GWEN_IpcEndpoint_CreateIpcTcpClient(), GWEN_IpcEndpoint_CreateIpcTcpServiceForSocket(), and GWEN_MsgIoEndpoint_Extend().


| GWENHYWFAR_API void GWEN_MsgIoEndpoint_SetGetNeededBytesFn | ( | GWEN_MSG_ENDPOINT * | ep, |
| GWEN_ENDPOINT_MSGIO_GETBYTESNEEDED_FN | f ) |
Definition at line 77 of file endpoint_msgio.c.
References GWEN_INHERIT_GETDATA.
Referenced by GWEN_IpcEndpoint_Extend().

| GWENHYWFAR_API void GWEN_MsgIoEndpoint_SetSendMsgFinishFn | ( | GWEN_MSG_ENDPOINT * | ep, |
| GWEN_ENDPOINT_MSGIO_SENDMSGFINISH_FN | f ) |
Definition at line 103 of file endpoint_msgio.c.
References GWEN_INHERIT_GETDATA.
| GWENHYWFAR_API void GWEN_MsgIoEndpoint_SetSendMsgStartFn | ( | GWEN_MSG_ENDPOINT * | ep, |
| GWEN_ENDPOINT_MSGIO_SENDMSGSTART_FN | f ) |
Definition at line 90 of file endpoint_msgio.c.
References GWEN_INHERIT_GETDATA.