Home Forums Support RCP Reconnect or check server

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2662
    Anonymous
    Inactive

    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

    #2663
    Anonymous
    Inactive

    Many thanks for your interest in our network library and welcome to our forums. I have asked one of our other developers to investigate this question and they should post back within the next few days.

    Kind regards,
    Marc

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.