EventPayload¶
EventPayload.
You can create an event option like the following code.
1 2 |
|
Functions¶
EventPayload EventPayload.New(table content)¶
ReturnsThe new event payload.
Creates a new instance of EventPayload
.
The only parameter content
is the object that needs to be sent.
Note: When invoking FireToClient
, FireToAllClients
and FireToServer
,
the content of EventPayload
must be serializable to JSON,
that is content must be one of string, number, boolean, table with string keys and table with successive number keys starting from 1.
content
The object to sent.
table GetContent()¶
ReturnsThe object to send.
Get the object to send.