Example #1
0
 private void Listen()
 {
     while (true)
     {
         try
         {
             _connection.Connect();
             ProcessRequest(_connection.Read());
         }
         catch (Exception ex)
         {
             _provider.LogWarning(
                 string.Format(SR.GoJanusListener.PipeListenerErrorMessage, ex.Message));
         }
     }
Example #2
0
        public void StartPipeServer()
        {
            isListening = true;
            ServerPipeConnection PipeConnection = new ServerPipeConnection(pipeName, 512, 512, 5000, false);

            Task.Run(() =>
            {
                while (isListening)
                {
                    PipeConnection.Disconnect();
                    PipeConnection.Connect();
                    try
                    {
                        string request = PipeConnection.Read();
                        onMessage?.Invoke(this, JsonConvert.DeserializeObject <pipeMessageData <object> >(request));
                    }
                    catch (Exception ex)
                    {
                    }
                }
                PipeConnection.Dispose();
            });
        }
Example #3
0
 internal void Connect()
 {
     CheckIfDisposed();
     PipeConnection.Connect();
 }