Question

As far as I know for a socket client to be able to connect to a socket server it needs to know the server's IP address.

But what happens when the server is using a dynamic IP address?

Is it possible to connect to the server in any other way (I don't think so)?

Is there a way for me to let the client know the server's IP address automatically?

Thanks in advance

Was it helpful?

Solution

Is it possible to connect to the server in any other way (I don't think so)?

You could use a DNS name as well. There are some DNS providers which allow you to associate a fixed DNS name to a dynamic IP address. You may take a look at dyndns.

Is there a way for me to let the client know the server's IP address automatically?

The client needs an IP or DNS name.

OTHER TIPS

you may store the dynamic IPs in some static IP data storage. the client will always know the static IP adress and from there he will take the dynamic adress.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top