fullpass.c sample program

The fullpass.c sample program is an Open Server gateway application that uses the Sybase Tabular Data Stream™ (TDS) passthrough mode. For more information on TDS passthrough, see the “Passthrough Mode” topics page in Chapter 2 of the Open Server Server-Library/C Reference Manual.

The event handler routine receives client requests through srv_recvpassthru and forwards this information to an Adaptive Server using the ct_sendpassthru routine. After the entire client command has been forwarded to the remote server, the event handler reads results from the remote server through ct_recvpassthru and returns them to the client using srv_sendpassthru.

The application also includes a SRV_CONNECT event handler. This handler uses srv_getloginfo and ct_setloginfo to forward client connection information to the remote server. It then uses ct_getloginfo and srv_setloginfo to return connection acknowledgment information to the client. All Open Server applications that use TDS passthrough mode must include these calls in their SRV_CONNECT event handler.