コード例 #1
0
        public void start()
        {
            mPipeProcessor = new PipeProcessor(
                "Client" + _ConnectionSignature,
                "Server" + _ConnectionSignature);

            _IEVRStreamControl = CaptureManager.createEVRStreamControl();

            mPipeProcessor.MessageDelegateEvent += mPipeProcessor_MessageDelegateEvent;

            mPipeProcessor.send("Initilized");

            mStartEvent.WaitOne();

            StartSession();

            mCloseEvent.WaitOne();

            if (Session != null)
            {
                Session.stopSession();

                Session.closeSession();
            }

            mPipeProcessor.closeConnection();
        }
コード例 #2
0
ファイル: ServerRuntime.cs プロジェクト: yaozd/Sword
        internal static void StartDispatchIncomeQueue()
        {
            while (true)
            {
                var incomingMsg = incomingQueueRepository.DequeueBlock();

                if (incomingMsg.ConnectionWorker.IsTagged)
                {
                    continue;
                }

                PipeProcessor pipe = pipeProcessorPool.PickOneIdle();

                pipe.GiveTask(incomingMsg);
            }
        }
コード例 #3
0
        private void startOffScreenCapture(
            string aSymbolicLink,
            uint aStreamIndex,
            uint aMediaTypeIndex)
        {
            mOffScreenCaptureProcess = new Process();

            mOffScreenCaptureProcess.StartInfo.FileName = "InterProcessRenderer.exe";

            mOffScreenCaptureProcess.EnableRaisingEvents = true;

            mOffScreenCaptureProcess.Exited += mOffScreenCaptureProcess_Exited;

            mPipeProcessor = new PipeProcessor(
                "Server" + mConnectionSignature,
                "Client" + mConnectionSignature);

            mPipeProcessor.MessageDelegateEvent += lPipeProcessor_MessageDelegateEvent;

            mOffScreenCaptureProcess.StartInfo.Arguments =
                "SymbolicLink=" + aSymbolicLink + " " +
                "StreamIndex=" + aStreamIndex + " " +
                "MediaTypeIndex=" + aMediaTypeIndex + " " +
                "ConnectionSignature=" + mConnectionSignature + " " +
                "WindowHandler=" + mVideoPanel.Handle.ToInt64();

            mConnectionSignature = Guid.NewGuid();

            mOffScreenCaptureProcess.StartInfo.UseShellExecute = false;

            try
            {
                mIsStarted = mOffScreenCaptureProcess.Start();

                HeartBeatTimer.Start();
            }
            catch (Exception)
            {
                mIsStarted = false;
            }
        }