DLM Monitor

Monitor Connect

dlm_MonConnect()

Initiates the process of bringing up the connection.

Syntax
#include "dlmmon.h"

DlmResult dlm_MonConnect
    (
        DlmMonitorId  id,
        DlmTimeout    timeout
    );
idid of session to connect
timeoutmaximum wait in milliseconds
Description

dlm_MonConnect() initiates the process of bringing up the connection to the server. The success or failure of the connection will be reported via the callback.

Return Values

If successful, dlm_MonConnect() returns a non-negative value. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:

See Also

dlm_MonDisconnect()

Example
if ((result = dlm_MonConnect(id, 10000)) < 0)
{
    printf("Error: Failure connecting: %s.\n", dlm_ErrorMessage(result));
}
else
{
    /* do something */

    if ((result =  dlm_MonDisconnect(id)) < 0)
    {
        printf("Error: Failure disconnecting %s.\n", dlm_ErrorMessage(result));
    }
    else
    {
        printf("Monitor disconnected.\n");
    }
}