Adding multiple tries to get gethostbyname in TCPClient