Socket.io in it’s current working state has a very interesting flaw we have been working through recently and it’s caused a great deal of confusion for everyone on board our team. This flaw even led to some heated arguments about objects and arrays and is all based around some really flawed misconceptions about Socket.io and how it functions.
In Python for instance I run my socket.emit and I send an event name and I can ONLY send object 1.
In the particular Android library I use though it assumes that I could send as many objects as possible so it forces me to wrap those objects up in an array and then sends them to the server. However my server is written in Python so it doesn’t want an array, it wants just that one object.
Using Node JS as the backend when I receive the array I automatically translate that array into the object list that I expected.
In our iOS library however we pieced it together like we did in Python and assume that you can only send object 1.