ctos.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. ctos.c processes a variety of client commands, including:
Bulk-copy commands
Cursor commands
Scrollable cursor commands
Dynamic SQL commands
Language commands
Message commands
Option commands
Remote procedure calls (RPCs)
In addition, ctos.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 sample programs included with Server-Library, ctos.c attempts to be complete.
It is provided as a coding template for use in a production environment.
To terminate the ctos.c program,
press CTRL+C from the Command window. The command in the README file is incorrect.
For more information about gateways, see the Open Server Server-Library/C Reference Manual.