Reputation: 6900
I'm putting together a simple application that uses Socket IO. The scenario works E2E but I'm seeing intermittent behavior when I'm on a poor connection. In these cases I get the "connect" event which usually means that I'm connected, but when I emit, nothing is sent or received from server. I turn on .log(true)
in my SocketIOClient
and I get lots of debug messages one of which is
Socket Engine Got Message: 3
I dug through the socket docs and code and haven't been able to find any refs that to what these error messages mean. In the SocketEngine file I found something referencing 3 as "Bad Request" but I am listening on the "error" event and haven't been getting any errors either.
I have two main questions:
Best Practices on debugging and putting proper logic into Socket IO so that I know when I'm really connected or not.
Debugging these log event codes (3, 2, ect...). I assume they are giving me important info about what is going on, but I'm not sure what the mapping is.
Thanks!
Upvotes: 3
Views: 1622
Reputation: 910
This log means that you got "pong" response, after sending a "ping". ping should be shown as: LOG SocketEngine: Sending ws: as type: 2 in your log.
Upvotes: 1