I'm sending the server 172.217.2.142\r\n
and it's only responding with:
#
# ARIN WHOIS data and services are subject to the Terms of Use
# available at: https://www.arin.net/whois_tou.html
#
# If you see inaccuracies in the results, please report at
# https://www.arin.net/public/whoisinaccuracy/index.xhtml
#
My receive function:
private string getResponse(Socket sock)
{
byte[] buffer = new byte[1024];
string result = string.Empty;
int bytesReceived = 0;
do
{
bytesReceived = sock.Receive(buffer, 0, buffer.Length, SocketFlags.None);
Debug.Print("Bytes read:" + bytesReceived.ToString());
result += Encoding.ASCII.GetString(buffer);
Array.Clear(buffer, 0, buffer.Length);
} while (bytesReceived > 0);
return result;
}