Create a Connection
To send actions to an ACI server, you must first create a connection. When you create the connection, you specify the host and port of the server you want to send the actions to. You can specify other connection settings, such as the number of times to retry a request that fails before abandoning it. For an example of how to create a connection, see Create a Connection Using the .NET IDOL SDK..
Create a Connection Using the .NET IDOL SDK.
The following example shows how to create various types of connection.
// Create an unencrypted connection using the default settings. IConnection unsecuredConnection = AciClient.CreateUnsecuredConnection("localhost", 9900); // Create a connection secured using BTEA encryption. uint[] key = { 123, 234, 345, 456 }; IConnection encryptedConnection = AciClient.CreateBteaConnection("localhost", 9900, key); // Create an unencrypted connection, overriding the number of // retries and the HTTP request method HttpSettings settings = new HttpSettings(); settings.Retries = 10; settings.Method = HttpSettings.HttpMethod.POST; IConnection anotherConnection = AciClient.CreateUnsecuredConnection( "localhost", 9900, settings);