Added method to access socket.io object