Accepts and processes notification deltas from the Delta Server. These will be of repository deltas and application files on sister applications running on other machines in the cluster. In the case of repository updates, the task is to locate the repository and apply the update. In the event of an uploaded file, the DS will apply the change. This function must be supplied to the hzIpServer singleton, by an AddTCPPort() call.
| Return Type | Function name | Arguments |
|---|---|---|
| hzTcpCode | ProcDelta | (hzChain&,hzIpConnex*,) |
Declared and defined in file: hzDelta.cpp
Function Logic:
Function body:
hzTcpCode ProcDelta (hzChain& ZI)hzIpConnex* pCx,
{
// Category: System
//
// Accepts and processes notification deltas from the Delta Server.
//
// These will be of repository deltas and application files on sister applications running on other machines in the cluster. In the case of repository updates, the task is to
// locate the repository and apply the update. In the event of an uploaded file, the DS will apply the change.
//
// This function must be supplied to the hzIpServer singleton, by an AddTCPPort() call.
_hzfunc(__func__) ;
chIter zi ; // Input message iterator
// uint32_t sessId ;
char res [8];
/*
** if (!_hzGlobal_DeltaClient)
** {
** res[0] = res[1] = res[2] = res[3] = 0 ;
** res[4] = DELTA_SVR_NACK ;
** res[5] = res[6] = res[7] = 0 ;
** }
** else
** {
** // Formulate command
** sessId = _hzGlobal_DeltaClient->SessID() ;
** res[0] = (sessId & 0xff000000) >> 24 ;
** res[1] = (sessId & 0xff0000) >> 16 ;
** res[2] = (sessId & 0xff00) >> 8 ;
** res[3] = sessId & 0xff ;
** res[4] = DELTA_SVR_ACK ;
** res[5] = res[6] = res[7] = 0 ;
** }
** */
if (write(pCx->CliSocket(), res, 8)< 0)
{
hzerr(E_SENDFAIL, "Send failed, killing connection\n") ;
return TCP_TERMINATE ;
}
return TCP_KEEPALIVE ;
}