Maintaining the connection between the client and server helps to avoid potential license overuse. Therefore, implementing heartbeats and the processes that should result from receiving unexpected heartbeat responses is important for network licensing.
LM-X offers manual and automatic heartbeats, which are described in the next sections. Automatic heartbeats are invoked with a specified interval in a separate thread by the LM-X client. Manual heartbeats can be called with any interval and do not require a separate thread.
While the heartbeat is invoked it checks the connection to the license server(s). If the server does not respond to heartbeats, your application will behave in the manner you specify. For example, you may specify that licensed applications cease functioning when the server becomes unavailable.
Heartbeats are also used by the server in order to establish whether the client is still active. If no heartbeat is received from an application instance within the configurable timeout, any other license server for that feature will be automatically used if available.
The client should send heartbeats at an interval shorter than the license server's timeout setting to ensure that it keeps its connection. The default server timeout is 5 minutes, and it is recommended that client applications send heartbeats every 1-2 minutes.
If there is problem with the server connection, the client will try to reconnect to the server and re-checkout the feature, and the status will be passed to the callback functions, as described in Callback functions.