Esempio n. 1
0
 public WmEAnpQueryCoreOp(EAnpIncomingQuery incomingQuery, WmCoreOp coreOp, AnpMsg res)
 {
     m_incomingQuery = incomingQuery;
     m_coreOp = coreOp;
     m_res = res;
 }
Esempio n. 2
0
        /// <summary>
        /// Helper method.
        /// </summary>
        private void HandleMsgReceived(AnpMsg m)
        {
            if (!m_openFlag) return;

            if (EAnpProto.IsCmd(m.Type))
            {
                if (m.Type == (uint)EAnpCmd.CancelCmd)
                {
                    EAnpIncomingQuery q = GetIncomingByID(m.ID);
                    if (q != null) q.InternalOnCancellation();
                }

                else
                {
                    EAnpIncomingQuery q = new EAnpIncomingQuery(this, m);
                    m_incomingTree[q.CmdID] = q;
                    if (OnIncomingQuery != null) OnIncomingQuery(this, new EAnpIncomingQueryEventArgs(q));
                }
            }

            else if (EAnpProto.IsRes(m.Type))
            {
                EAnpOutgoingQuery q = GetOutgoingByID(m.ID);
                if (q != null) q.InternalOnReply(m);
            }

            else if (EAnpProto.IsEvt(m.Type))
            {
                if (OnIncomingEvent != null) OnIncomingEvent(this, new EAnpIncomingEventEventArgs(this, m));
            }
        }
Esempio n. 3
0
 public EAnpIncomingQueryEventArgs(EAnpIncomingQuery query)
 {
     Query = query;
 }
Esempio n. 4
0
 /// <summary>
 /// Remove an incoming query from the incoming query tree.
 /// </summary>
 public void InternalRemoveIncoming(EAnpIncomingQuery q)
 {
     m_incomingTree.Remove(q.CmdID);
 }