Hi all I\'m trying to send a javascript object through websockets:
the faye-websockets documentation says:
send(message) accepts either
Client:
const bson = new BSON(); ws.binaryType = 'arraybuffer'; ws.onmessage = function(event) { console.log(bson.deserialize(Buffer.from(event.data))); }
Server:
const data = bson.serialize({ ... }); ws.send(data);