Sending A Float32array Via Socket.io
I am currently stuck at sending a Float32Array via socket.io to another socket. There is no real code to show, since I am only using socket.emit and socket.on. On the other end of
Solution 1:
Sending in the client:
vararray = new Float32Array(...);
socket.emit('data', array.buffer);
Receiving in the client:
socket.on('data', function(data) {
var array = newFloat32Array(data);
...
});
I don't think you need to do anything special in the server, just pass along the data that you receive from the first client to the second client.
Post a Comment for "Sending A Float32array Via Socket.io"