Home Help Center

a question about connection info

mathglmathgl Member gelin yanOrganization: RoundTech Research CentreProject: large scale vehicle tracing system
As of 3.4, connection info has supported to retrieve remote ip address and remote port directly like:

code in python:


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.


  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff

    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.

Sign In or Register to comment.