ACI API 24.1

# Create a Connection

You must create a connection object (type `ACI_CONNECTION`) to establish a connection with the server. You must set the server host details in this object before making a request. You can specify other connection settings, such as the number of times a connection to the server is attempted and fails before the request is abandoned. For an example of how to create connections, see Create a Connection Using the C-language IDOL SDK.

## Create a Connection Using the C-language IDOL SDK

The following example shows how to create a connection object.

    // Always need to call aciInit at start of any program using ACI client lib
    aciInit();

    // Create the connection object
    t_aciObject* pConnection = NULL;
    aciObjectCreate(&pConnection, ACI_CONNECTION);

    // Set host details
    aciObjectParamSetString(pConnection, ACI_HOSTNAME, "12.3.4.56");
    aciObjectParamSetInt(pConnection, ACI_PORTNUMBER, 4001);
    aciObjectParamSetInt(pConnection, ACI_CONN_RETRIES, 1);

Copyright 2023 Open Text
Version 24.1 | Last updated December 2023

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: IDOL ACI API 24.1

Topic Title: Create a Connection