Results 1 to 2 of 2

Thread: How to retrieve IP-Address from location service

  1. #1
    raphi is offline Registered User
    Name: Thoma Raphael
    Organization: HSR Rapperswil
    Project: VDN
    Join Date
    May 2008
    Posts
    1

    Thumbs up How to retrieve IP-Address from location service

    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
    Last edited by raphi; 05-09-2008 at 01:04 PM.

  2. #2
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi,

    You can use the Ice locator interface to retrieve the endpoints your indirect proxy:

    Code:
         // 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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to get client's IP address?
    By leojay in forum Help Center
    Replies: 1
    Last Post: 08-27-2009, 08:47 AM
  2. How to get client's ip address when I use Glacier?
    By ewiniar in forum Help Center
    Replies: 2
    Last Post: 06-16-2006, 05:55 AM
  3. Change IP address during runtime
    By wgwolf in forum Help Center
    Replies: 1
    Last Post: 05-31-2006, 04:35 AM
  4. about restrict IP address in Ice
    By richardma in forum Help Center
    Replies: 2
    Last Post: 01-24-2006, 02:25 AM
  5. How to get client's IP address
    By zephyr007 in forum Help Center
    Replies: 4
    Last Post: 12-28-2004, 09:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •