getaddrinfo, freeaddrinfo does name lookup, may cause problems in some closed networks, it may perform dns lookups and it somehow seems to use a lock which sometimes created problems. It may be possible to eliminate this since we already have the host name/ip and port.