To get full access to the Kademi Hub existing customers can login here, or new customers can register here.
Properties
Name | Returns | Notes | Example |
---|---|---|---|
host | String | Get the host this socket is connected to | |
commentsType | String | Gets the data type | |
decodedId | String | Gets the decoded id that was used when connecting | |
itemId | String | Get the Item ID | |
attributes | Map | Get the attributes attached to this socket, this includes any parameters included when the socket connected | |
profileId | Long | Get the id of the profile if a user is logged in |
Methods
Name | Returns | Notes | Example |
---|---|---|---|
send ( msg ) | void | Send a message to this websocket | |
broadcastAll ( msg ) | void | Broadcasts a message to all other sockets with the same type and itemId, including this session | |
broadcast ( msg ) | void | Broadcasts a message to all other sockets with the same type and itemId, excluding this session | |
close ( ) | void | Closes this WebSocket. | |
close ( code ) | void | Closes this WebSocket using the specified status code. | |
close ( code, reason ) | void | Closes this WebSocket using the specified status code and reason. | |
setItemId ( itemId ) | void | Sets the Item ID for this socket, the item id is used when sending and broadcasting messages |