Convert Blob to <int> List

I use protocol buffers in a dart , but have a problem due to the way I get data from a web socket connection. Binary data is accepted as Blob , and the protobuf message constructor expects List<int> . How do I go about converting Blob to List<int> ?

+4
source share
1 answer

I managed to get this working by setting the binaryType property in the WebSocket object to "arraybuffer" .

webSocket.binaryType = "arraybuffer";

+9
source

Source: https://habr.com/ru/post/1500192/


All Articles