Following code is a socket programming sample for a TCP client.
But when I run this, connect() is returned as Address family not supported by protocol.
I have he
I seen this error during bind. Cause was of using localhost
instead of IP:
./myprogram localhost:7777
*** exception! `bind' failed for `localhost:7777' (97, Address family not supported by protocol)
./myprogram 127.0.0.1:7777
OK! Listening...
In addition: this error happens on one Linux host and does not appear on another. I check and compare network settings on this machines (lo
device, /etc/hosts, /etc/host.conf, etc) and not found essential difference