socket.IO-objc icon indicating copy to clipboard operation
socket.IO-objc copied to clipboard

Update SocketIO.m

Open jnoring opened this issue 11 years ago • 2 comments

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.

jnoring avatar Sep 18 '14 16:09 jnoring

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.

jnoring avatar Sep 18 '14 16:09 jnoring

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!

aldevet avatar Apr 18 '15 18:04 aldevet