Use getaddrinfo to resolve and compute weight fom mc urls