I have a general question regarding binding and connecting to localhost
. I am using a TCP client/server and on the server side I do sth of the form:
bind(localhost, 9999);
listen();
This is done on a unix host with a name e.g. host1
Now, the client is running on a separate Windows box, on the same network. In order to connect I tried to connect via hostname:port
, hostIp:port
but none of that succeeds.
Is this because binding to localhost is not visible across the network for other processes to connect to and is used for e.g. client/server running on the same machine?