Gateway Open Server sample program

The ctos.c sample program 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:

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.

NoteUnlike 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 on gateways, see the Open Server Server-Library/C Reference Manual.