Best practice for managing proxies in C++
I have a thread class that calls periodically an Interface with ACM support. I store as member of the class the communicator and recreate the proxy each time the Server is down but it does not feel right.
What I do not really understand is when to invalidate the proxy. Apparentely the stringToProxy function can never fail providing the string syntax is correct. How the checkedCast function know if the proxy is available ? Does it perform a network request behind the scene ? Basically could I keep the same proxy, wether the Server is online or not, and only manage with exceptions when there is not Server running ?
Thanks for your help