Example #1
0
 public void Process()
 {
     ProcessorOnceEvent?.Invoke(this, null);
     ProcessorOnceEvent = null;
     ProcessorEvent?.Invoke(this, null);
     LayoutProcessorEvent?.Invoke(this, null);
 }
Example #2
0
        public CServer(string name, int port, int backlog)
        {
            mName    = name;
            mPort    = port;
            mBacklog = backlog;

            mInvokeAcceptConnection = new ProcessorEvent(InvokeAcceptConnection);
            mInvokeDisconnection    = new ProcessorEvent(InvokeDisconnection);
            mInvokeReceiveData      = new ProcessorReceiveEvent(InvokeReceiveData);
            mInvokeSendData         = new ProcessorSendEvent(InvokeSendData);
        }
Example #3
0
        public CRemoteManageClient(IMonitorSystemContext context)
        {
            mSystemContext = context;

            mAsyncDoConnected    = new ProcessorEvent(AsyncDoConnected);
            mAsyncDoDisconnected = new ProcessorEvent(AsyncDoDisconnected);
            mAsyncDoReceiveData  = new ProcessorReceiveEvent(AsyncDoReceiveData);

            mTimer = new System.Threading.Timer(new TimerCallback(OnTimerTick));
            mTimer.Change(AutoConnectInterval, AutoConnectInterval);

            mSendPipeManager.OnSendOperate += new DeleSendOperate(DoSend);
            //mReceivePipe.OnProcessData += new ProcessorReceiveEvent(AsyncDoReceiveData);

            //mReceivePipe.Start();
        }
Example #4
0
        public void AddProcessorEvent(ProcessorEvent pEvent)
        {
            switch (pEvent)
            {
            case ProcessorEvent.StartProcessing:
                this.counters.CurrentRequests.Increment();
                return;

            case ProcessorEvent.EndProcessing:
                this.counters.CurrentRequests.Decrement();
                return;

            default:
                return;
            }
        }