Results 1 to 2 of 2

Thread: a question about connection info

  1. #1
    mathgl is offline Registered User
    Name: gelin yan
    Organization: RoundTech Research Centre
    Project: large scale vehicle tracing system
    Join Date
    Jan 2010
    Location
    HongKong
    Posts
    23

    a question about connection info

    As of 3.4, connection info has supported to retrieve remote ip address and remote port directly like:

    code in python:

    current.con.getInfo().remoteAddress
    current.con.getInfo().remotePort

    however, i noticed sometimes, those methods couldn't get an appropriated result. I ran a few tests against this point and quickly found out occasionally the remoteAddress was an empty string
    and the remotePort was -1 where a positive integer should be there.

    I want to know whether this getInfo() is stable to retrieve an ip address or not. I need this for logging purpose.

    test environment:

    server; win2008. Ice 3.4.1 (python)

    Thansk for your help.

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

    Yes, you should be able to use the information returned by getInfo(). An empty remote address and a remort port value of -1 indicates that the connection isn't connected anymore.

    Cheers,
    Benoit.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Question about the Connection#5
    By OrNot in forum Help Center
    Replies: 1
    Last Post: 08-07-2005, 10:16 PM
  2. Question about the Connection#4.
    By OrNot in forum Help Center
    Replies: 3
    Last Post: 07-22-2005, 10:56 AM
  3. A question about bidirectional connection
    By rc_hz in forum Help Center
    Replies: 3
    Last Post: 07-21-2005, 07:12 AM
  4. A question about Connection Management
    By rc_hz in forum Help Center
    Replies: 9
    Last Post: 05-31-2005, 10:57 PM
  5. How to get connection info?
    By amrufon in forum Help Center
    Replies: 15
    Last Post: 08-26-2003, 08:23 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
  •