socket.io-msgpack-parser icon indicating copy to clipboard operation
socket.io-msgpack-parser copied to clipboard

can not send binary in Uint8Array

Open codati opened this issue 3 years ago • 1 comments

hello, I can't send binary, in any case, I don't have the same behavior as the default parser default converts server-side binary data to a buffer

test.zip

with the default passer I have

{
   id: <Buffer 5e 36 f1 2a 35 63 31 37 d4 62 74 ea 55 7b 27 76 39 c6 d9 e4 0d 4c 5e df d6 22 67 12 47 34 4a bf 26>
}

with yours:

{
   id: {
     '0': 253,
     '1': 109,
     '2': 246,
     '3': 228,
     '4': 86,
     '5': 211,
     '6': 4,
     '7': 78,
     '8': 145,
     '9': 176,
     '10': 90,
     '11': 92,
     '12': 35,
     '13': 81,
     '14': 85,
     '15': 238,
     '16': 227,
     '17': 137,
     '18': 125,
     '19': 101,
     '20': 59,
     '21': 220,
     '22': 93,
     '23': 249,
     '24': 63,
     '25': 188,
     '26': 91,
     '27': 184,
     '28': 134,
     '29': 43,
     '30': 7,
     '31': 82,
     '32': 132
   }
}

codati avatar May 30 '22 00:05 codati

I made .buffer on the Uint8Array object it works but, it would be nice to have the same behavior as the default parser on this

codati avatar May 30 '22 01:05 codati