Home Help Center

how to capture the callee hostname/IP (IcePy)

alexmalexm Member Eskinder Alex MesfinOrganization: Medtronic, Inc.Project: www.medtronic.com
Using the example in demo/callback for python, if I want to log every callers hostname or IP address, what routine/method do I need to invoke to get those information.

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    In your servant, you can obtain a description of the incoming connection like this:
    def myOperation(current=None):
        if current:
            puts current.con.toString()
        else:
            puts "local invocation"
    
    Take care,
    - Mark
Sign In or Register to comment.