ctosdemo.c is a gateway Open Server application. It uses Server-Library calls and Client-Library calls. First, it accepts commands from a client and passes them to a remote Adaptive Server. Then, it retrieves the results from the remote server and passes them to the client. ctosdemo.c processes a variety of client commands, including:
Bulk-copy commands
Cursor commands
Dynamic SQL commands
Language commands
Message commands
Option commands
Remote procedure calls (RPCs)
In addition, ctosdemo.c responds to attention requests from a client by calling the SRV_ATTENTION event handler. It includes an event handler routine to process each type of client command.
Unlike other example programs included with Server-Library, ctosdemo.c attempts
to be complete. It is provided as a coding template for use in a
production environment. To terminate the ctosdemo.c program,
press Ctrl-c from the Command window. The command
in the README file is incorrect.
For more information on gateways, see the Open Server Server-Library/C Reference Manual.