In the simplest configuration, the client establishes a dialog using authentication services provided by the security mechanism. Open Server performs the login negotiation before the connection event handler is called. After the connection handler issues a srv_senddone(SRV_DONE_FINAL), Open Server sends a login acknowledgment with status “success” to the client.
You are not required to install a connection handler for this configuration; the default connection handler is sufficient. If you do install a connection handler, the must at least send a srv_senddone(SRV_DONE_FINAL), as shown in this example:
CS_RETCODE CS_PUBLIC connect_handler(spp)
SRV_PROC *spp;
{
.......
/*
** You do not need to test this srv_senddone’s return value
** since Open Server will kill this thread if this call fails.
*/
(CS_VOID)srv_senddone(spp, SRV_DONE_FINAL, CS_TRAN_UNDEFINED,
(CS_INT)0);
return(CS_SUCCEED);
}