YEventClientMesage(3) Client message event structures


typedef struct {

#define YClientMessageFormatString 0
#define YClientMessageFormatBinary 1
#define YClientMessageFormatInteger8 2
#define YClientMessageFormatIntegerU8 3
#define YClientMessageFormatInteger16 4
#define YClientMessageFormatIntegerU16 5
#define YClientMessageFormatInteger24 6
#define YClientMessageFormatIntegerU24 7
#define YClientMessageFormatInteger32 8
#define YClientMessageFormatIntegerU32 9
#define YClientMessageFormatInteger64 10
#define YClientMessageFormatIntegerU64 11

        int format;             /* One of YClientMessageFormat*. */
#define YClientMessageTypeComment 0

        int type;               /* One of YClientMessageType*. */
#define YClientMessageMessageMax 256

        char message[YClientMessageMessageMax]; /* Not null terminated! */

        int length;             /* Length of message in bytes. */

} YEventClientMessage;

When you receive this event, it means another Y client, the Y server, or even your own Y client has sent a client message to notify you of something.

The purpose, meaning, and required responses are defined by the client. This is usually indicated by the value of the member type. However it is up to the Y client to determine how to respond to the message.

Most messages can simply be ignored if you do not know what they mean. Note that the message is not null terminated.