If I have a string with ones and zeros, like this:
"0101101"
Is there anyway I can send only those bits, with the WebSocket.prototype.send method?
First I have to convert them into an ArrayBuffer, how would I do that?
If I just send the string, each 1 and 0 would be 1 byte long (since they are chars and not bits, and UTF-8 encoded), that wouldnt just work, how can I convert these string-bits into an ArrayBuffer and send them?
No, this is not a dublicate since it's not about converting a bitstring to int values. It's about converting it to an ArrayBuffer