Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var ws = new WebSocket("ws://3.214.186.49/cable?token=ad42fd59d0459ca91ee4237043083b53");
- ws.send(JSON.stringify({"command":"subscribe","identifier":'{"channel": "ChatChannel","channel_name":"channel_name_1"}'}));
- ws.send(JSON.stringify({"command":"message","identifier":'{"channel": "ChatChannel","channel_name":"channel_name_1"}',"data":JSON.stringify({action: "send_message", body: "Hi everyone !", user: "ANTON"})}));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement