This example shows the gateway application installing an SRV_START event. An SRV_START event occurs once (when srv_run is called) and starts the Open Data Services server application. The SRV_START event invokes the init_server callback function defined in GATECBS.C to initialize the remote server. The init_server function installs the remaining events required to run the gateway application.
int init_server (SRV_SERVER * server);
srv_handle (server, (DBINT)
SRV_START, init_server);
srv_handle (server, (DBINT)SRV_CONNECT, init_remote);
srv_handle (server, (DBINT)SRV_LANGUAGE, lang_execute);
srv_handle (server, (DBINT)
SRV_RPC, rpc_execute);
srv_handle (server, (DBINT)SRV_DISCONNECT, exit_remote);
srv_handle (server, (DBINT)SRV_ATTENTION, attn_handler);
return (SRV_CONTINUE);