Working with Websockets
What are websockets?
Basics of working with websockets
// Example app config with WebSocket settings
var appData = {
"jsonData": {
"isAjax": true,
"isMobile": false,
"websocket_url": "wss://example.com/chat",
"token": "abc123securetoken"
},
"webroot": "https://example.com/",
"controller": "Chat",
"action": "index",
"params": {
"userId": 42,
"room": "general"
}
};Coding the websocket client
Last updated