public SingleRequestChannel(ReactorBase reactor, INode endPoint, string controlCode)
     : base(reactor, endPoint, controlCode)
 {
     Receive      += ProtocolProxyAgent.Instance().DataPointListener_Receive;
     SendCallback += ProtocolProxyAgent.Instance().DataPointListener_Send;
     this.Configure(ConstantConnConfig.ProcessModeRequest);
 }
Exemple #2
0
        /// <summary>
        /// 执行一个请求任务
        /// </summary>
        /// <param name="functionType"></param>
        /// <param name="asyncCallback"></param>
        /// <param name="timeout"></param>
        /// <param name="value"></param>
        public virtual void RequestReactorFunction(int functionType, AsyncCallback asyncCallback, int timeout, object value)
        {
            ConnectionTask task = new ConnectionTask();

            task.Name  = functionType.ToString();
            task.Param = value;
            ((ReactorConnectionAdapter)ProtocolProxyAgent.Instance().reactorConnectionAdapter).ExecuteTaskAsync(task, asyncCallback, timeout);
        }
Exemple #3
0
 protected override void Dispose(bool disposing)
 {
     ProtocolProxyAgent.Instance().RemoveDataPointListener(this);
     base.Dispose(disposing);
 }
Exemple #4
0
 public ComplexRequestChannel(ReactorBase reactor, INode endPoint, List <string> ListeningTaskIds)
     : base(reactor, endPoint, ListeningTaskIds.FirstOrDefault().ToString())
 {
     ListenerTaskIdList.AddRange(ListeningTaskIds);
     ProtocolProxyAgent.Instance().AddDataPointListener(this);
 }
 public DefaultResponse(ReactorBase reactor)
     : this(reactor, null)
 {
     Receive += ProtocolProxyAgent.Instance().DataPointListener_Receive;
 }