For the record I'd like to mention that using just the "specs" at https://github.com/socketio/engine.io-protocol results in an incorrect implementation.
I tried porting the javascript implementation at first: it resulted in a mess of event-hell.
So, I finally used the specs first, then some good-old-fashioned protocol reverse engineering, sprinkled with an extremely limited glance at the javascript implementation to aid the reverse engineering.
Ironically, one of Engine.IO's main features is listed on https://github.com/socketio/engine.io as having been "Written in readable vanilla JavaScript". It ultimately depends on your definition of "readable", I guess.