Websocket Socketio Rant
I learned that websocket is not the same as socket.io. While this may seem obvious in hindsight, I wasn’t aware I was using socket.io until I spent a long time trying to figure out why I couldn’t use websocket (ws://) protocol to connect to my (http://) server, which used socket.io to handle websocket connections. Socket.io is built on top of the websocket protocol, but also supports old, non-websocket-supporting browsers. I was setting up a simple Python Flask webserver, and was using Flask Socketio. I thought they were one and the same.
Another thing I found is, as of now (Sept 2017), there are poor support for python socket.io clients. Of about the only two python packages I found to handle socketio, there seems to be many inconsistencies in the library function and I couldn’t predict the behaviour of what it was supposed to do. After many hours of fussing about, I switched to C++ socketio library (sio_client.h). And it works very well, I got it to work quickly.