Message

Namespace: dmMessage Language: C++ Type: Defold C++ File: message.h Source: engine/dlib/src/dmsdk/dlib/message.h Include: dmsdk/dlib/message.h

Api for sending messages

API

dmMessage::Result

Type: ENUM Result enum

Members

dmMessage::StringURL

Type: STRUCT Helper struct for parsing a string of the form “socket:path#fragment”

Notes

Members

dmMessage::URL

Type: STRUCT URL specifying a sender/receiver of messages

Notes

dmMMessage::MessageDestroyCallback

Type: TYPEDEF A callback for messages that needs cleanup after being dispatched. E.g. for freeing resources/memory.

GetFragment

Type: FUNCTION Get the message fragment

Parameters

Returns

GetPath

Type: FUNCTION Get the message path

Parameters

Returns

GetSocket

Type: FUNCTION Get the message socket

Parameters

Returns

GetSocketName

Type: FUNCTION Get socket name

Parameters

Returns

GetSocketNameHash

Type: FUNCTION Get socket name hash

Parameters

Returns

HSocket

Type: TYPEDEF Socket handle

IsSocketValid

Type: FUNCTION Tests if a socket is valid (not deleted).

Parameters

Returns

Message

Type: STRUCT

Message

Type: STRUCT Message data desc used at dispatch callback. When a message is posted, the actual object is copied into the sockets internal buffer.

Members

ParseUrl

Type: FUNCTION Convert a string to a URL struct

Notes

Parameters

Returns

ResetUrl

Type: FUNCTION Resets the given URL to default values.

Notes

Parameters

SetFragment

Type: FUNCTION Set the message fragment

Parameters

SetPath

Type: FUNCTION Set the message path

Parameters

SetSocket

Type: FUNCTION Set the socket

Parameters