Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Possible callback functions are:

information returned

Name

Status

Information Returned

HEARTBEAT_CONNECTION_LOST_FUNCTION

Connection with license server was lost.

HEARTBEAT_RETRY_FEATURE_FUNCTION

Reconnection with license server succeeded. Re-attempt to checkout feature from license server.

HEARTBEAT_CHECKOUT_FAILURE_FUNCTION

License lost; could not be regained from license server.

HEARTBEAT_CHECKOUT_SUCCESS_FUNCTION

License retained successfully.

HEARTBEAT_EXIT_FUNCTION

The automatic heartbeats thread calls this callback function when it has given up reconnecting to the license server. When using this callback, ensure you set a proper exit flag during the callback and then shut down or otherwise cease functionality of the application.

...

  • If re-checkout succeeds, the HEARTBEAT_CHECKOUT_SUCCESS_FUNCTION callback is called.
  • If re-checkout fails (for example, when there are no licenses left for checkout), HEARTBEAT_CHECKOUT_FAILURE_FUNCTION is called.
  • The HEARTBEAT_EXIT_FUNCTION callback is called only if the heartbeat count is exhausted.

Examples

The following examples describe callback function behavior when heartbeats are lost.

servers action heartbeats implementedCallback function behavior when connection is lost

Available

Servers

Client

Action

Type of

Heartbeats Implemented

Callback Function Behavior When Connection Is Lost

S1

CHECKOUT feature from S1

Automatic

(LMX_OPT_AUTOMATIC_HEARTBEAT_ATTEMPTS set to 3)
(S1 goes down)
HEARTBEAT_CONNECTION_LOST_FUNCTION
HEARTBEAT_CONNECTION_LOST_FUNCTION
HEARTBEAT_CONNECTION_LOST_FUNCTION
(S1 goes up)
HEARTBEAT_RETRY_FEATURE_FUNCTION
HEARTBEAT_CHECKOUT_SUCCESS_FUNCTION

S1, S2, S3

CHECKOUT feature from S1

Automatic

(LMX_OPT_AUTOMATIC_HEARTBEAT_ATTEMPTS set to 5)
(S1 goes down)
HEARTBEAT_CONNECTION_LOST_FUNCTION
HEARTBEAT_CONNECTION_LOST_FUNCTION
HEARTBEAT_CONNECTION_LOST_FUNCTION
HEARTBEAT_CONNECTION_LOST_FUNCTION
HEARTBEAT_CONNECTION_LOST_FUNCTION
(S2 is up but has no features left)
HEARTBEAT_RETRY_FEATURE_FUNCTION
HEARTBEAT_CHECKOUT_FAILURE_FUNCTION
(S3 is up)
HEARTBEAT_RETRY_FEATURE_FUNCTION
HEARTBEAT_CHECKOUT_SUCCESS_FUNCTION

S1, S2, S3

CHECKOUT feature from S1

Manual

(S1 goes down)
HEARTBEAT_CONNECTION_LOST_FUNCTION
HEARTBEAT_RETRY_FEATURE_FUNCTION
HEARTBEAT_CHECKOUT_FAILURE_FUNCTION
(S2 is up but has no features left)
HEARTBEAT_RETRY_FEATURE_FUNCTION
(S3 is up)
HEARTBEAT_CHECKOUT_SUCCESS_FUNCTION

S1 and S2

CHECKOUT features A and B from S1

CHECKOUT feature C from S2

Automatic

(LMX_OPT_AUTOMATIC_HEARTBEATS_ATTEMPTS set to 3)
(S1 and S2 go down)
(on S1:)
HEARTBEAT_CONNECTION_LOST_FUNCTION
(on S2:)
HEARTBEAT_CONNECTION_LOST_FUNCTION
(S1 goes up)
(for feature A:)
HEARTBEAT_RETRY_FEATURE_FUNCTION
HEARTBEAT_CHECKOUT_SUCCESS_FUNCTION
(for feature B:)
HEARTBEAT_RETRY_FEATURE_FUNCTION
HEARTBEAT_CHECKOUT_SUCCESS_FUNCTION
(on S2:)
HEARTBEAT_CONNECTION_LOST_FUNCTION
(S2 goes up)
(for feature C:)
HEARTBEAT_RETRY_FEATURE_FUNCTION
HEARTBEAT_CHECKOUT_SUCCESS_FUNCTION

S1 and S2

CHECKOUT feature from S1

Automatic

(LMX_OPT_AUTOMATIC_HEARTBEATS_ATTEMPTS set to 3)
(S1 goes down)
CONNECTION LOST
(S1 goes up, but no features are available)
HEARTBEAT_RETRY_FEATURE_FUNCTION
HEARTBEAT_CHECKOUT_FAILURE_FUNCTION
HEARTBEAT_RETRY_FEATURE_FUNCTION
(this is the 3rd heartbeat)
HEARTBEAT_CHECKOUT_FAILURE_FUNCTION
(on S2:)
HEARTBEAT_RETRY_FEATURE_FUNCTION
HEARTBEAT_CHECKOUT_SUCCESS_FUNCTION