Exemplo n.º 1
0
 internal void ReadDataFromPipe()
 {
     while (true)
     {
         Log.Debug("Waiting for message from native host...");
         var bytes = NativeMessageSerializer.ReadMessageBytes(pipe);
         Log.Debug($"Message from native host {bytes.Length} bytes");
         this.MessageReceived?.Invoke(this, new NativeMessageEventArgs(bytes));
     }
 }
Exemplo n.º 2
0
 internal void Start(byte[] initialConfig)
 {
     try
     {
         readerThread.Start();
         NativeMessageSerializer.WriteMessage(pipe, initialConfig);
     }
     catch (Exception ex)
     {
         Log.Debug(ex, ex.Message);
     }
 }
Exemplo n.º 3
0
 internal void Publish(byte[] data)
 {
     try
     {
         NativeMessageSerializer.WriteMessage(pipe, data);
         pipe.Flush();
     }
     catch (Exception ex)
     {
         Log.Debug(ex, ex.Message);
     }
 }