I made a server and a client program. The server program creates a socket on
the local computer and waits for a connetion.
The client program sould connect to the server and send an information to it.
When I try to make the client program to connect to the server using the IP
number it doesn't work.
I ran the following code on the server computer:
ipHostEntry=Dns .Resolve(Dns.Ge tHostName());
MessageBox.Show (ipHostEntry.Ho stName);
MessageBox.Show (ipHostEntry.Ad dressList[0].ToString());
MessageBox.Show (ipHostEntry.Ad dressList[1].ToString());
The result was some host name of the server computer, some static IP number
that doesn't seem to change from a connetion to another connection and and IP
number which is the dynamic IP number of the server computer.
When I try to make the Client program to connect to the server by its
hostname it tells me that this host name doesn't exist.
When I try to connect through the static IP number it works
and when I try to connect by the dynamic IP it doesn't work.
Please can anybody explain me why it doesn't work with the host name and the
dynamic IP and what is this static IP number.
(We both run ADSL connections)
thanks
the local computer and waits for a connetion.
The client program sould connect to the server and send an information to it.
When I try to make the client program to connect to the server using the IP
number it doesn't work.
I ran the following code on the server computer:
ipHostEntry=Dns .Resolve(Dns.Ge tHostName());
MessageBox.Show (ipHostEntry.Ho stName);
MessageBox.Show (ipHostEntry.Ad dressList[0].ToString());
MessageBox.Show (ipHostEntry.Ad dressList[1].ToString());
The result was some host name of the server computer, some static IP number
that doesn't seem to change from a connetion to another connection and and IP
number which is the dynamic IP number of the server computer.
When I try to make the Client program to connect to the server by its
hostname it tells me that this host name doesn't exist.
When I try to connect through the static IP number it works
and when I try to connect by the dynamic IP it doesn't work.
Please can anybody explain me why it doesn't work with the host name and the
dynamic IP and what is this static IP number.
(We both run ADSL connections)
thanks