Manage Connections

Use the CDNode class to manage Connect:Direct® connections. The CDNode class creates and deletes connections to the Connect:Direct node as needed and deletes the connections if they are idle for a specified period of time.

The connections are stored in an array and are created and assigned by the CDNode object when a command requests a connection to the physical node. Connections are reused when they are idle and are deleted if they remain idle for an extended period of time. Because each connection consumes resources on both the client and the server, use them as efficiently as possible. The DisconnectAll member function is used to disconnect all connections to all nodes.