Return TypeFunction nameArguments
hzIpServer*hzIpServer::GetInstance(hzLogger*,)

Declared in file: hzIpServer.h
Defined in file : hzIpServer.cpp

Function Logic:

0:START 1:!pLogger 2:Return 0 3:s_pTheOneAndOnlyServer 4:pSvr 5:!pSvr 6:Return 0 7:pSvr pSvr s_pTheOneAndOnlyServer 8:Return pSvr

Function body:

hzIpServer* hzIpServer::GetInstance (hzLogger* pLogger)
{
   _hzfunc("hzIpServer::GetInstance") ;
   hzIpServer* pSvr = 0;
   if (!pLogger)
   {
       hzerr(E_NOINIT, "No logfile supplied") ;
       return 0;
   }
   if (s_pTheOneAndOnlyServer)
   {
       pSvr = s_pTheOneAndOnlyServer ;
       if (!pSvr)
       {
           hzerr(E_CONFLICT, "Application is attempting to allocate a TCP Server when a UDP Server is already allocated") ;
           return 0;
       }
       hzerr(E_CONFLICT, "Application is attempting to allocate more than one server instance") ;
   }
   else
   {
       pSvr = new hzIpServer() ;
       pSvr->m_pLog = pLogger ;
       s_pTheOneAndOnlyServer = pSvr ;
   }
   return pSvr ;
}