I don't have enough time to write now, so I'll just show you some links that you can see all the information(the codes).

https://github.com/keesun/mod-socket-io

With this module, you can code like this.

[gist id=3487021]

If you have more interest in the vert.x module that using the socket.io, you can reference my sample module project at here.

https://github.com/keesun/mod-test

Thanks.