TCPClient slowing to a crawl

i couldn’t get the built-in gethostbyname to work (the function that does the DNS lookup) so i made my own here