示例#1
0
 public void Initialize()
 {
     StaticHelpers.LogToDebug($"{nameof(IthVnrSharpLib)}.{nameof(EmbedHost)}.{nameof(Initialize)}");
     try
     {
         _pipeServer      = new NamedPipeServerStream(PipeName, PipeDirection.InOut, NamedPipeServerStream.MaxAllowedServerInstances);
         _listeningThread = new Thread(async() => await ServerThread())
         {
             Name = PipeHostThreadName
         };
         _listeningThread.Start();
     }
     catch (Exception ex)
     {
         StaticHelpers.LogToFile(ex);
     }
     Initialized = true;
 }