Advertisement
Guest User

Untitled

a guest
Sep 20th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var ws = new WebSocket("ws://3.214.186.49/cable?token=ad42fd59d0459ca91ee4237043083b53");
  2.  
  3. ws.send(JSON.stringify({"command":"subscribe","identifier":'{"channel": "ChatChannel","channel_name":"channel_name_1"}'}));
  4.  
  5. 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