Start websocket proxy with;
npm start
To receive any update, start the socket with;
socket.emit("set-client");
Any updates will be provided with the "update" tag
socket.on("update", function (msg) {
var item = document.createElement("li");
item.textContent = msg;
messages.appendChild(item);
window.scrollTo(0, document.body.scrollHeight);
})
To provide updates, start the socket with;
socket.emit("set-provider");
Example payload;
socket.emit("payload", { data });