private void ReceiveLoop()
        {
            Logger.Log(LogLevel.Info, "Waiting for connection...");
            receivePipeStream.WaitForConnection();
            Logger.Log(LogLevel.Info, "Got connection! Processing messages!");

            while (true)
            {
                serviceReceiver.ProcessMessage();
                receivePipeStream.Flush();
            }
        }
Пример #2
0
        static void StartPipeHandler()
        {
            threadID = ThreadHelper.GetCurrentThreadId();
            servicePipe.WaitForConnection();

            while (running)
            {
                serviceReceiver.ProcessMessage();
                servicePipe.Flush();
            }

            servicePipe?.Dispose();
        }
Пример #3
0
        void StartPipeHandler()
        {
            threadID = ThreadHelper.GetCurrentThreadId();
            captureServicePipe.WaitForConnection();

            while (running)
            {
                listenerReceiver.ProcessMessage();
                captureServicePipe.Flush();
            }

            captureServicePipe?.Dispose();
        }
        private void RunWaitForConnection()
        {
            waitThreadId = ThreadHelpers.GetCurrentThreadId();
            Debugger.Debug(LogLevel.Info, $"Wait Thread ID: {waitThreadId}");

            while (waiterRunning)
            {
                waitForConnectionEvent.WaitOne();
                Debugger.WriteLine(LogLevel.Info, "EventEmitter: Waiting for connection");
                try
                {
                    pipeStream.WaitForConnection();
                    IsConnected = true;
                    Debugger.WriteLine(LogLevel.Info, "EventEmitter: Connected!");
                }
                catch (Exception)
                {
                    Debugger.WriteLine(LogLevel.Info, "EventServer: Waiting aborted! Closing...");
                    waiterRunning = false;
                    IsConnected   = false;
                    return;
                }
            }
        }