Tango Core Classes Reference  9.3.3
Reconnection and exception

API reconnection

The Tango API automatically manages re-connection between client and server in case of communication error during a network access between a client and a server. The transparency reconnection mode allows a user to be (or not be) informed that automatic reconnection took place. If the transparency reconnection mode is not set, when a communication error occurs, an exception is returned to the caller and the connection is internally marked as bad. On the next try to contact the device, the API will try to re-build the network connection. If the transparency reconnection mode is set (the default case), the API will try to re-build the network connection has soon as the communication error occurs and the caller is not informed. Several cases are possible. They are summarized in the following table:

Case Server state Call nb Exception (transparency false) Exception (transparency true)
Server killed and re-started Server killed before call n n CommunicationFailed ConnectionFailed
Down n + 1 ConnectionFailed (2 levels) idem
Down n + 2 idem idem
Running n + x No exception

No exception

Server died and re-started Server died before call n n CommunicationFailed ConnectionFailed
Died n + 1 ConnectionFailed (3 levels) idem
Died n + 2 idem idem
Running n + x No exception

No exception

Server killed and re-started Server killed and re-started before call n n CommunicationFailed No exception
Running n + x No exception

No exception

Server died and re-started Server died and re-started before call n n CommunicationFailed No exception
Running n + x No exception No exception

Please note that the timeout case is managed differently because it will not enter the re-connection system. The transparency reconnection mode is set by default to true starting with Tango version 5.5.