Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert Blob to List<int>

I'm using protocol buffers in dart but having an issue due to the way data is received from the web socket connection. Binary data is being received as a Blob, and the constructor for the protobuf message is expecting a List<int>. How would I go about converting a Blob into a List<int>?

like image 398
w.brian Avatar asked Sep 02 '13 17:09

w.brian


1 Answers

I was able to get this working by setting the binaryType property on the WebSocket object to "arraybuffer".

webSocket.binaryType = "arraybuffer";

like image 179
w.brian Avatar answered Nov 14 '22 10:11

w.brian