-
Iv'e written a winsock app . It's two seperate pieces a server and a client . Heres my systems
I have 3 pc's all on a lan through a linksys stwitch . all the machines have a local IP (on the lan) . I also have a dialup connection on all machines . Now If I run the server
with no OUTSIDE CONNECTION (ie. the net) the clients on the lan set their Ip to the Ip the server is running on , and connect with no problem . If I establish a connection Via Dialup to the outside world and run the server the winsock reports the Local IP (winsock1.localIp) not the Dialup IP
yet it seems to listen on both Ip's but shows only the LAN ip ? is this a bug/feature of winsock or poor coding ?
-
I don't know if I should call this a bug or not. The limitation is that you get the IP address from a simple property and not an array.
On one of my servers I have mapped two IP addesses to one NIC but the INet control only reports one of them.
The reason that your server application listen to both IP's is because it doesn't map it to the address itself but rather the port your using. Every call that comes in via IP that maps to the correct port is captured by your application.
Best regards
-
This does't sound very good to me especialy if the server is run on a machine that supports multiple domains like a web server . How can I fix this ?
-
There is an API to determine the IPs that are associated with your computer.
if you created a new post with the subject "determine computer IP addresses" you will get more help.
----------
quickly i would batch
route print
to a text file and read it.
The interface column will return all IPs that are associated with your computer