// Example 1: Get the host information for the current region LLViewerRegion* region = gAgent.getRegion(); std::string host = region->getHost(); LL_INFOS() << "Host for region " << region->getName() << " is " << host << LL_ENDL; // Example 2: Get the host information for a specific region by name std::string region_name = "Some Region"; LLViewerRegion* region = gAgent.getRegionByName(region_name); if (region) { std::string host = region->getHost(); LL_INFOS() << "Host for region " << region_name << " is " << host << LL_ENDL; } else { LL_WARNS() << "Region " << region_name << " not found." << LL_ENDL; }These examples use the Second Life Viewer codebase and therefore belong to the Second Life Viewer package library.