Writing a Socket.IO server in C++

I want to write a C++ server that uses the same wire format as Socket.IO. I found the gevent-socketio packet codec for the wire but I can't find the corresponding client codec.

The packets get encoded like this: 5:1+::{"name": "tobi"}

The socket.io-protocol#Packet doesn't seem to specify the wire format, and the identifiers don't seem to match up with those used by gevent-socketio.

Is there a definitive wire format? Is it possible to write a Socket.IO-compatible server, maybe for some fixed version of the protocol, with a fixed/known client library?