how to convert arraybuffer to string
问题 I have written a simple TCP server on node.js to send some data to a Chrome app. In the chrome app, when I get the data, I convert that to string using below function, I get an exception " byte length of Uint16Array should be a multiple of 2 " String.fromCharCode.apply(null, new Uint16Array(buffer)) I could not find any information about what could be causing this and how to fix this. Any pointers on this is highly appreciated. Below is the code in node.js server for sending the data to