Coding and installing a full passthrough event handler

The prototype for a full-passthrough event handler is:

CS_RETCODE CS_PUBLIC func (SRV_PROC *sproc);

A full-passthrough event handler calls these routines to receive and send packets:

You will not be able to forward attention events while performing a srv_recvpassthru/ct_sendpassthru loop. You must add logic to the event-handler code and attn-handler code so that an attentionevent is not forwarded until after the full command has been forwarded to the remote server.

A full-passthrough event handler should return CS_SUCCEED to report normal completion. A return value other than CS_SUCCEED kills the current Open Server thread.

To install a full-passthrough event handler, call srv_handle with srv_handle’s event parameter as SRV_FULLPASSTHRU and the handler parameter as the address of the handler routine.