You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WebSocketChannel emit and request pass the arguments keyword to _wrapper._sendEvent, but the Array-like arguments object gets JSON.stringify-d into an object instead of an array.
For example, socket.emit('event-name', 'foo', 'bar') sends:
The arguments object could be turned into an array to match the protocol, e.g. using Array.from(arguments) or [...arguments] or Array.prototype.slice.call(arguments).
I only noticed this issue because I decoded the packets in C# instead of JavaScript.
Thanks for the library, I've used it in several projects already.
The text was updated successfully, but these errors were encountered:
Also, as a side note, I'm planning on implementing a server-side Go library for this at some point next year. (So, obviously, the protocol has to be done right). If you have started a C# library and you have the freedom to open source it, I'd love to link to it from this project!
WebSocketChannel
emit
andrequest
pass thearguments
keyword to_wrapper._sendEvent
, but the Array-likearguments
object gets JSON.stringify-d into an object instead of an array.For example,
socket.emit('event-name', 'foo', 'bar')
sends:while the protocol states it should be:
The
arguments
object could be turned into an array to match the protocol, e.g. usingArray.from(arguments)
or[...arguments]
orArray.prototype.slice.call(arguments)
.I only noticed this issue because I decoded the packets in C# instead of JavaScript.
Thanks for the library, I've used it in several projects already.
The text was updated successfully, but these errors were encountered: