Ok so an update:
I found a nice demo in another forum post here:
https://www.qb64.org/forum/index.php?topic=1389.msg105754#msg105754I copied the code into to qb64 programs on my pc and it worked beautifully.
I then moved the host program to my raspberry pi and changed the ip address on the client program (I tried a few) and still the same problem.
I then tried to see if I could get both programs to on the pi and it can't connect. So I think it might be something with the Pi not being able to listen to a port properly or a missing library or something. I'm not too sure where to go from here tho.
After work I'm going to try to run the client program on a different pc and the host on my pc to see if I can get a connection on different devices period.
If anyone has any ideas or places for me to look I will be so grateful.