wrap socket.io in angular resource.