gwenhywfar
5.11.1beta
|
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.
GWENHYWFAR_API void GWEN_MsgIoEndpoint_SetGetNeededBytesFn | ( | GWEN_MSG_ENDPOINT * | ep, |
GWEN_ENDPOINT_MSGIO_GETBYTESNEEDED_FN | f | ||
) |
GWENHYWFAR_API void GWEN_MsgIoEndpoint_SetSendMsgFinishFn | ( | GWEN_MSG_ENDPOINT * | ep, |
GWEN_ENDPOINT_MSGIO_SENDMSGFINISH_FN | f | ||
) |
GWENHYWFAR_API void GWEN_MsgIoEndpoint_SetSendMsgStartFn | ( | GWEN_MSG_ENDPOINT * | ep, |
GWEN_ENDPOINT_MSGIO_SENDMSGSTART_FN | f | ||
) |