Results 1 to 3 of 3

Thread: How can the server know who connect it?

  1. #1
    acku711 is offline Registered User
    Name: Zhang Pp
    Organization: Neusoft
    Project: R&D
    Join Date
    Dec 2008
    Location
    Beijing,China
    Posts
    4

    How can the server know who connect it?

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

  2. #2
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    You can print this information by calling on the Ice::Current. Something like:

    Code:
    void
    HelloI::sayHello(const Ice::Current& current)
    {
       cout << current.con->toString() << endl;
    }

  3. #3
    acku711 is offline Registered User
    Name: Zhang Pp
    Organization: Neusoft
    Project: R&D
    Join Date
    Dec 2008
    Location
    Beijing,China
    Posts
    4
    Thanks very much,Matthew!
    It works!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 06-23-2010, 09:40 AM
  2. [help]how to connect a server by ip?
    By joise in forum Help Center
    Replies: 5
    Last Post: 06-30-2006, 05:11 AM
  3. Can icePHP connect to Ice server by iceGrid Mode?
    By meizhe in forum Help Center
    Replies: 9
    Last Post: 06-19-2006, 11:48 PM
  4. problem with server connect client
    By hero107 in forum Help Center
    Replies: 3
    Last Post: 02-20-2006, 07:01 AM
  5. Replies: 4
    Last Post: 02-28-2004, 01:40 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
  •