I have client server cocoa application. client communicate with server by using server’s IP address. My questions are how can i check that my server IP address is changed in my cocoa application and how can i notify clients that server’s IP address is changed (should i store IP address of client @server and notify to client). I am using Distributed object for communication between client and server.
I have client server cocoa application. client communicate with server by using server’s IP
Share
Use DNS. It supports finding the current IP address of a server, which means that you can easily detect when the IP address changes (and have clients automatically use the updated address). If you envisage rapid changes of the server’s address you can use a short time-to-live on your DNS responses.