Some issues with the os i think. Firewall shouldnt be an issue, the program that I have created is allowed to accept connections and send across them. When I setup a second socket, and then do a netstat -an call its blocking. Furthermore, I do a sudo lsof | grep "program" ... it shows this program 9917 K7 10u IPv4 0x0da942b8 0t0 TCP *:* (CLOSED) It makes it impossible to communicate with servers after this happens. Both sockets are setup as non blocking as well. Does anybody have an idea why this would happen?