public ChannelServer(int iChannel, string sWMVDirectory, ref Logger logger) { m_iChannel = iChannel; m_iPort = OysterEncoder.Encoder.ChannelDefaultPort(iChannel); m_bDone = false; log = logger; m_Encoder = new Encoder(iChannel,sWMVDirectory,ref logger); }
// start threads and initialize encoder. returns false on errors internal bool Start(ref OysterEncoder.Encoder oEncoder) { log.Context = System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName + "." + System.Reflection.MethodBase.GetCurrentMethod().Name; bool bReturn = true; if (m_bStarted) { throw new System.ApplicationException("Connection.Start already called. Call Connection.Stop first."); } log.WriteLog("Starting Connection ..."); m_Encoder = oEncoder; m_bDone = false; m_bConnected = true; m_ThreadDequeAndExecute.Start(); m_ThreadReceiveDataAndEnqueue.Start(); //m_ThreadIsConnectionAlive.Start(); m_bStarted = true; return bReturn; }