Archived

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

how can i get peer ip_address in server side?

as topical , i need know which connection ip_address came in ,

python code as following:
def RegisterFDC(self, ident, _ctx=None):
try:
_ctx.conn.xx # here i want to get conn's ip_address,but i can't found any method
#do ip_address check ....
fpc = FrontDispatchControllerPrx.checkedCast(_ctx.conn.createProxy(ident))
except:
print 'RegisterFDC exception occurred!'
return False
return True

Comments

  • matthew
    matthew NL, Canada
    What do you want to know this for? You cannot directly get that information. For debugging information you can call toString() on the connection. On the server side you can get the connection by looking at current.con. On the client side you can get the connection (if any) by calling ice_connection() on the proxy.