All Commands
All Other
Commands
WEBSOCKET_SEND
This will send a Web Socket message to all currently connected specified users.
Use the following JavaScript to act on the received message:
You do not need the {WEBSOCKET_REQ()} command on a page to send messages using the {WEBSOCKET_SEND} command.
You do need the {WEBSOCKET_REQ()} command on a page when using the JavaScript Function udb.webSocket.sendMessage(ug_list, type, obj_id, title, message) to send a message from the client.
Number | Name | Default | Type | Description |
---|---|---|---|---|
1 | ug_list | String | A comma separated list of User IDs or Group Names you want to send the message to. e.g. [9876, 5432] or [Group1, Accounts] |
|
2 | type | console.log | String | The type of message to be sent. This is simply a way of categorising the message so the receiving code knows what to do with it. There are some reserved types that are handled automatically by the code, and can be used for testing.
|
3 | obj_id | 0 | Integer | An object to send to the recipients |
4 | title | String | An optional message title to send | |
5 | message | String | A message to send to the recipients |