/*
 *
 * Function: run
 * Description:  
 * Input: 
 * OutPut:
 *      
 * Return:
 * Other:
 *
 */
int CommandServer::run( void )
{
   int iSize;

   if( initShareMemory() == -1 )
   {
      return -1;
   }

   int iRet = makeListener( &m_pstListen, m_pstRoot, m_pstConfig->m_iListenPort,
                            APR_INET, SOCK_STREAM );
   if( iRet == -1 )
   {
      return -1;
   }

   maintenance();

   return 0;
}
ConnectionPtr EventDispatcher::attachTo(const EventDispatcherPtr& target, const lost::event::Type& type)
{
  return target->addEventListener(type, makeListener(this, &EventDispatcher::queueEvent));
}