Closed chris-schmitz closed 3 years ago
Welcome to the Firecamp! Thanks and congrats for opening your very first issue in Firecamp. Join the Discord community here https://discord.gg/8hRaqhK Hope you have a great time here :)
@chris-schmitz Have you tried the following snippets at your WS server?
ws.binaryType = "arraybuffer"
ws.on('message', data => {
console.log(data);
})
Here is the API reference
Default ws
server receives a binary message in nodebuffer
arraybuffer
then set ws.binaryType='arraybuffer'
blob
then set ws.binaryType='blob'
Similar issue on ws repo
I tried adding that setting but I'm still seeing utf encoded values.
That said, I didn't read the linked issue in depth yet, I'll review that more and see if it has more detail that I can dig into.
@chris-schmitz Can you please confirm this issue? It's been shipped under the Canary v2 RC-8
release. If you think anything can still be improved then please let us know :)
Firecamp v2.0 released.
Describe the bug I'm trying to send an ArrayBuffer up to my server, but the data that ends up isn't the actual binary data, it's the ascii ascii character equivalent of the binary data. i.e. if I tried to send up
00000001
, it would be sent up as a string. The actual data going up would be0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x31
since0x30
is the ascii equivalent of the character0
and0x31
is the string character of1
.TBH I could be using the tool wrong. I couldn't find a definitive explanation of how to send the ArrayBuffer, so I'm assuming I just provide the raw data.
To Reproduce Steps to reproduce the behavior:
Expected behavior I'd expect the data being sent up to be the binary data from the buffer.
Screenshots 0r Video
smoother vid version of the recording can be found here
Platform (please complete the following information):