socket.io-client-swift icon indicating copy to clipboard operation
socket.io-client-swift copied to clipboard

Use correct default socket path. Use native engine of StarScream

Open Crysis21 opened this issue 1 year ago • 0 comments

I've been debugging in the past 2 days why the socket.io is not working connecting with our backend. Android was working fine, but iOS seems to be stuck with no explanation. I managed to get it working and some of the reasons are these:

  1. the default socket.io path is encoded to engine.io whereas the correct one is socket.io as specified in the docs. This definely made a lot of people not understand what is happening and probably the issues opened in the past few days, can relate to this.
  2. from what I tested, the default implementation of starscream uses custom ws engine by default. however, this doesn't seem to work great with our backend and using the native engine seems to be doing a great job.
  3. there is no logging of the WS events and error logs are not handeld at all. For this reason, we had no idea that we were getting a 404 when the upgrade request was being made.

Crysis21 avatar Mar 19 '24 11:03 Crysis21