I’m writing an app to connect to a telnet server. When I use the IP address I connect with no problem, but if I use the DNS address, the “connect” command returns a negative value:
if (connect(sock, (struct sockaddr *)&server, sizeof(server)) < 0)
I’m sure I’m missing some configuration somewhere, but I have’t been able to find any reference to it. Any help is appreciated. Thanks!