(sock)
return sock.getsockname()[0]
Get the IP address the socket is bound to.
Get the IP address the socket is bound to.
Get the IP address the socket is bound to .
def get_ip(sock):
    """Get the IP address the socket is bound to."""
    return sock.getsockname()[0]
def get_ip ( sock ) : return sock . getsockname ( ) [ 0 ]