I'm missing something here -- I have a ByteArray a...
# javascript
e
I'm missing something here -- I have a ByteArray and I want to convert it to a ArrayBuffer or an ArrayBufferView. The ByteArray is coming back from protobufjs and the ArrayBuffer/View is what a websocket.send(...) method requires. hmmmm
Why do I figure out solutions once I ask for help? 😞
Copy code
val bytes:ByteArray = v.protoMarshal()
 val uint8Array = Uint8Array(bytes.toTypedArray())
        ws.send(uint8Array)
rubber duck 1