An IQ for XmppTAReply, we separate the XmppTA into separate queries and results to simplify handling.
상속: Element
예제 #1
0
        /// <summary>We got a reply to one of our requests.  Let's send the result
        /// back to the TA listener.</summary>
        protected void HandleReply(Element msg, JID from)
        {
            XmppTAReply xt = msg as XmppTAReply;

            if (xt == null)
            {
                return;
            }

            if (!xt.Realm.Equals(_realm))
            {
                return;
            }

            UpdateRemoteTAs(xt.TransportAddresses);
        }
예제 #2
0
        /// <summary>Some remote entity inquired for our TA, but we only reply if
        /// we are in the same realm.</summary>
        protected void HandleRequest(Element msg, JID from)
        {
            XmppTARequest xt = msg as XmppTARequest;

            if (xt == null)
            {
                return;
            }

            IList tas = EMPTY_LIST;

            if (xt.Realm.Equals(_realm))
            {
                tas = LocalTAsToString(20);
            }
            XmppTAReply xtr = new XmppTAReply(new XmlDocument(), _realm, tas);

            _xmpp.SendTo(xtr, from);
        }