Step 4: Send commands to the server

In Client-Library, a command is a request for action sent from the client application to the server. Each command belongs to a command type and may have input data associated with it. Client-Library bundles this information into a symbolic format and sends it over the network to the server, where it is executed.

firstapp.c sends a language command to the server. This command instructs the server to parse and execute the query that was defined as ct_command’s text (third) parameter. For information on other command types, see Chapter 5, “Choosing Command Types.”

An application defines and sends commands to a server by using a CS_COMMAND structure. To define and send a command, the application: