Client-Library state machines

The application programming interface (API) layer of Client-Library consists of three state machines, each corresponding to one of the three basic control structures: CS_CONTEXT, CS_CONNECTION, or CS_COMMAND. See “Hidden structures” for a discussion of the basic control structures.

At the context level, an application sets up its environment by: allocating one or more context structures, setting CS-Library properties for the contexts, initializing Client-Library, and setting Client-Library properties for the contexts. See “Step 1: Set up the Client-Library programming environment”.

At the connection level, an application connects to a server by: allocating one or more connection structures, setting properties for the connections, opening the connections, and setting any server options for the connections. An application can allocate a connection structure only after a context structure has been allocated. See “Step 3: Connect to a server”.

At the command level, an application allocates one or more command structures, sends commands, and processes results. An application can allocate a command structure only after a connection structure has been allocated. See “Step 4: Send commands to the server”.