P
pigeonrandle
Hi,
This started off being a question along the lines of "how do i get the
local machine ip address?", which can be done using ....
String sIPAddress =
Dns.Resolve(System.Environment.MachineName).AddressList[0].ToString
unfortunately, the [0] bit reminded me that a computer can have more
than one IP (technically, i hadn't forgotten, it had just become
obfuscated due to the hashing effect of alcohol).
So anyway(!), i have a server app (that can be installed on several
machines on a network) and a client app (several instances again), but
the servers could be sat on machines that have DHCP IP addresses.
What's the best way to get the clients to find the server if its IP has
changed?
I was considering using some form of broadcast from the server that
would perpetuate until it 'knew' all the clients had found its new
location? And this is where the multiple IP addresses come in beacuse i
also need to know if the AddressList always enumerates the IP's in the
same order (what if a network adapter had broken, etc), because my
server needs to know which IP it should be broadcasting to the clients.
Afterthought!: Is there a way to find out the MAC address of an IP
because i could use that?
Thankyou in advance you clever people you!
James Randle.
This started off being a question along the lines of "how do i get the
local machine ip address?", which can be done using ....
String sIPAddress =
Dns.Resolve(System.Environment.MachineName).AddressList[0].ToString
unfortunately, the [0] bit reminded me that a computer can have more
than one IP (technically, i hadn't forgotten, it had just become
obfuscated due to the hashing effect of alcohol).
So anyway(!), i have a server app (that can be installed on several
machines on a network) and a client app (several instances again), but
the servers could be sat on machines that have DHCP IP addresses.
What's the best way to get the clients to find the server if its IP has
changed?
I was considering using some form of broadcast from the server that
would perpetuate until it 'knew' all the clients had found its new
location? And this is where the multiple IP addresses come in beacuse i
also need to know if the AddressList always enumerates the IP's in the
same order (what if a network adapter had broken, etc), because my
server needs to know which IP it should be broadcasting to the clients.
Afterthought!: Is there a way to find out the MAC address of an IP
because i could use that?
Thankyou in advance you clever people you!
James Randle.