Open jnoring opened 10 years ago
It's possible I'm not understanding how this code works, but I have some server communication using socket-io that expects the args argument to be something like "[NSDictionary, NSString]" (which is likely bogus, but nonetheless, what I have to work with). If there's another way to do this, I'm all ears.
I was having issues with multiple parameters like:
socket.on('publish', function (options, sdp, callback) {
Because of the double-wrap all data will go to first parameter. This pull request solves it, hope it merges!
sendEvent assumes the incoming data isn't an NSArray already; this causes it to double-wrap NSArray objects (so instead of [data], you end up with [[data]]. Check if the incoming objet is of type NSArray, and if so pass it along verbatim.