xk6-websockets
xk6-websockets copied to clipboard
Need support for []uint8
Currently trying to write tests for a YJS socket implementation.
I've managed to convert the yjs-socket library so that it works in goja, but i've hit a wall in that it transfers binary data via a Uint8Array. Right now this library doesn't support it that type. Since it's just a binary type represented as an array of 8-bit unsigned integers, shouldn't this be possible to do?
add this to the case statement here
case sobek.Uint8Array:
w.bufferedAmount += len(o)
w.writeQueueCh <- message{
mtype: websocket.BinaryMessage,
data: o,
t: time.Now(),
}
this is a guess, but it seems that it should work?