I finally got socket.io to work properly, but I have encountered a strange problem.
I am not sure if this is the best way, but I am using:
io.sockets.cli
Also take a look into:
io.sockets.manager.connected
It's a clean list of key value pairs (socket id and connection state?)