| Return Type | Function name | Arguments |
|---|---|---|
| void | hzIpServer::ServeResponses | (void) |
Declared in file: hzIpServer.h
Defined in file : hzIpServer.cpp
Function Logic:
Function body:
void hzIpServer::ServeResponses (void)
{
_hzfunc("hzIpServer::ServeResponses") ;
hzList<hzIpConnex*> lc ;
hzList<hzIpConnex*>::Iter ic ;
hzPacket tbuf ;
hzIpConnex* pCC ;
for (; !m_bShutdown ;)
{
pthread_mutex_lock(&s_response_mutex);
pthread_cond_wait(&s_response_cond, &s_response_mutex);
for (;;)
{
pCC = (hzIpConnex*) s_queResponses.Pull() ;
if (pCC)
lc.Add(pCC) ;
if (!lc.Count())
break ;
for (ic = lc ; ic.Valid() ;)
{
pCC = ic.Element() ;
if (pCC->_isxmit())
{
pCC->_xmit(tbuf) ;
if (!pCC->_isxmit())
{
ic.Delete() ;
continue ;
}
}
ic++ ;
}
}
pthread_mutex_unlock(&s_response_mutex);
}
}