Archived
This forum has been archived. Please start a new discussion on GitHub.
How to retrieve IP-Address from location service
in Help Center
Hello
I'm looking for a way to get the IP-address of a client out of the proxy object, which i got from a icegrid location service (indirect proxy). As mentioned in this forum, a indirect proxy returns an empty vector when ice_getEndpoints() is called.
I couldn't figure out a way to retrieve the IP-address out of the location service. Could you please give me any tipps?
Thank you
I'm looking for a way to get the IP-address of a client out of the proxy object, which i got from a icegrid location service (indirect proxy). As mentioned in this forum, a indirect proxy returns an empty vector when ice_getEndpoints() is called.
I couldn't figure out a way to retrieve the IP-address out of the location service. Could you please give me any tipps?
Thank you
0
Comments
-
Hi,
You can use the Ice locator interface to retrieve the endpoints your indirect proxy:// C++ Ice::LocatorPrx locator = commicator->getDefaultLocator(); if(!locator) { cerr << "no locator configured!" << endl; return; } Ice::ObjectPrx proxy = locator->findAdapterById(myProxy->ice_getAdapterId()); Ice::EndpointSeq endpoints = proxy->ice_getEndpoints(); ...
Cheers,
Benoit.0