I have finally gotten my client and server programs working that I was doing as an exercise. However, I would now like to get them to work with them being run on different computers, maybe just my lan, but really I'd like to know how to over the internet.
Currently, for the sockaddr_in struct, I am just doing:
sockaddr_in sockin;
sockin.sin_addr.s_addr = inet_addr("127.0.0.1");
and I am doing that on both the client and the server, because I was running the server and the client on my computer
What would I do if I wanted my program to work over the internet? Lan seems like it would be easy, but for internet I'm just lost.
2007-03-14
13:06:26
·
2 answers
·
asked by
Anonymous
in
Computers & Internet
➔ Programming & Design
in response to the first answer:
i am aware that that is the local loopback, my problem is that I do not know what to put for server ip, i obviously cannot just put my 192.168... address, because that is the local lan address, and if the client was running somewhere else, it obviosuly wouldnt work over internet, but i wudnt imagine putting my routers external ip wud work, or wud it? idk, thats why im asking =S
2007-03-14
13:13:30 ·
update #1