SocketIO + gevent_socketio (django)

SocketIO + gevent_socketio (django)
0.0 0


I just figured out how to make this work and figured I’d share in the hopes that it may save some others from having to dig through the bowels of the gevent_socketio package.

gevent_socketio requires a trailing / in the handshake url which the cocos library does not provide. To fix this just go to socketio/ and update SocketIOHandler.RE_HANDLHAKE_URL. Ensure you are updating the that is actually in use (There was a one in gevent_socketio but it was the one in socketio that was actually used).

RE_HANDSHAKE_URL = re.compile(r"^/(?P<resource>.+?)/1/$", re.X)

RE_HANDSHAKE_URL = re.compile(r"^/(?P.+?)/1/?$", re.X)

That’s it. Once I found that one character the connection went through nice and easy. Also, you can just append namespaces onto the end of the connect url and they work properly.

_client = SocketIO::connect(*this, “”);