Home Help Center

How can the server know who connect it?

acku711acku711 Member Zhang PpOrganization: NeusoftProject: R&D
Hi,
A simple question just as the title says.
I need to know the client IP.

Comments

  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    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;
    }
    
  • acku711acku711 Member Zhang PpOrganization: NeusoftProject: R&D
    Thanks very much,Matthew!
    It works!
Sign In or Register to comment.