Hi,
You can't get these endpoints directly. Instead, you would need to call on the IceGrid locator interface to retrieve the endpoints, for example:
Code:
Ice::ObjectPrx proxy = communicator->getDefaultLocator()->findAdapterById("ProxyGroup");
Ice::EndpointSeq endpoints = proxy->ice_getEndpoints();
Then, you can go through the stringified endpoints and extract the host information.
Note that the IceGrid locator might not necessarily return all the endpoints of the replica group, how many endpoints are returned depends on the n-replicas configuration of your replica group, see here for more information on this attribute.
I'm curious as to why you need to get the IP address of each replicas. Is this to invoke on each replica individually? In this case, it might be better to use the findAllReplicas method of the IceGrid::Query interface to retrieve the proxies of each replica for a given replicated proxy.
Cheers,
Benoit.