Archived

This forum has been archived. Please start a new discussion on GitHub.

How can the server know who connect it?

Hi,
A simple question just as the title says.
I need to know the client IP.

Comments

  • matthew
    matthew NL, Canada
    You can print this information by calling on the Ice::Current. Something like:
    void
    HelloI::sayHello(const Ice::Current& current)
    {
       cout << current.con->toString() << endl;
    }
    
  • Thanks very much,Matthew!
    It works!