Home Help Center

Obtain IP address of calling entity from Ice::Current

halfhphalfhp Member Nick FellowsOrganization: AoptixProject: optical comms appliance ✭✭
Hi there,

I was wondering if there was a way to obtain the IP Address of a calling entity via the Ice::Current instance.

I should also mention that I'm using version 3.3.1 so not all of the latest operations are available to me.

Thanks!

Nick

Comments

  • halfhphalfhp Member Nick FellowsOrganization: AoptixProject: optical comms appliance ✭✭
    Hmm...I see where somebody else asked this question and was told that they have to parse the Ip out of current.con.toString(). I also see where the latest FAQ recommends a different approach using methods that don't appear to be available in 3.3.1. I'm assuming for now that this means the string parsing solution is the only one available as of 3.3.1
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    Yes, this is correct, you can't directly get the IP address of the client with 3.3.1, you'll need to parse the result of calling toString on the connection.

    Cheers,
    Benoit.
Sign In or Register to comment.