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);