io.sockets.adapter.rooms
// Function to get socket to leave all rooms it's connected to. socket.leaveAll();