Esempio n. 1
0
        /// <summary>
        /// Creates array of sockets, but doesn't connect them.
        /// </summary>
        /// <returns></returns>
        private bool CreateAudioRouterSockets()
        {
            bool   bRet = true;
            int    ii, iSessions;
            int    iFirstPortNum = 1780;
            string sTmp          = "";

            try
            {
                iSessions = m_RM.GetMaxSessions();
                m_AMSocks = new AMSockConns(m_Logger);

                sTmp = ConfigurationManager.AppSettings[AudioEngine.cs_FirstAudioRtrPort];
                sTmp = (sTmp == null) ? "" : sTmp;
                if (sTmp.Length > 0)
                {
                    iFirstPortNum = int.Parse(sTmp);
                }
                for (ii = 0; ii < iSessions; ii++)
                {
                    m_AMSocks.NewSockConn((iFirstPortNum + (ii * 2)), (iFirstPortNum + ((ii * 2) + 1)));
                }
            }
            catch (Exception e)
            {
                bRet = false;
                //Console.Error.WriteLine("ERROR AudioMgr.AudioEngine_srv.CreateAudioRouterSockets:  Caught exception '{0}'.", e.ToString());
                m_Logger.Log(e);
            }

            return(bRet);
        }
Esempio n. 2
0
        public AudioEngine_srv(ILegacyLogger i_Logger)
        {
            m_Logger   = i_Logger;
            m_SockMsgs = new AMSockData[0];
            m_RM       = new ResourceMgr_local(m_Logger);
            m_aASRs    = new ArrayList();

            m_NumAudioStreams = m_RM.GetMaxSessions();

            CreateAudioRouterSockets();
        }
 public DialogMgr_srv(ILegacyLogger i_Logger)
 {
     m_Logger     = i_Logger;
     m_RM         = new ResourceMgr_local(m_Logger);
     m_NumDialogs = m_RM.GetMaxSessions();
 }