-
I'm working on developing an internet file sharing aplication-sort of like napster, but not limited to MP3 files.
I understand that using a dialup is NOT the best way to do this, but I am on a budget. I was thinking of setting up a server app that would distribute all of the current shared files to each client, and send out IP addresses if someone wanted to download a file from another computer. Then client 1 would connect to client 2 and start the transfer.
What I need to know, is how to determine the clients current IP address.
Also-I use a dialup internet connection, and my IP changes everytime I dial in. How would I go about letting the clients know the current server IP? I could have the server store the current IP on a txt file on the internet and have the clients check there first. Any suggestions??
THX!
-
From a winsock control, look at .LocalIP
-
I thought your local IP and the IP used to connect to your machine over the ineternet were different numbers? Doesn't that call just give your local IP adress?
-
Sorry, my brain went into 'how do I get my IP' mode.
In any case, in everything I've written in which I need to tell a remote what my IP is, I use .LocalIP.
Yeah, having the client fetch it from a fixed location you update as needed is about all you can do for now.
-
The only probem I have with the local IP number-
Example: Everyone who had networking done by Company A uses 192.168.0.1 for the local server IP on their LAN. If they try to use my software my server app will get several connections at 192.168.0.1-won't this cause the Winsock.Sendata to send stuff to everyone with the same IP?
-
Ok I think I found the answer:
Winsock.RemoteHostIP
Hopefully this will work for my project and give the IP address that I need :)
Thanks cookre!
-
What about your customers who connect through a proxy server?