Initial implementation of socket.io