Hi,
What would be the correct design for checking if the server is still alive before calling a remote method?
I think that try..catch isn’t the better way and I’ve tried somthing like that:
//Client side code
IMyObj myObj = (…) //Acquire the remote instance
IRPCProxy proxy = (IRPCProxy)myObj;
bool isAlive = proxy.ServerConnection.ConnectionAlive();
if (!isAlive)
{
//reconnect
}
So, it didn’t work because ConnectionAlive() always returned true, even when my server was droped.
Shoud I acquire a instance every time I use it?
There is a way to auto reconnect the remote object?
Many thanks