An IQ for XmppTARequest, we separate the XmppTA into separate queries and results to simplify handling.
Inheritance: Element
Esempio n. 1
0
        /// <summary>We need some TAs, let's query our friends to see if any of them
        /// can supply us with some.<summary>
        protected override void SeekTAs(DateTime now)
        {
            if (_ready == 0)
            {
                return;
            }

            XmppTARequest xtr = new XmppTARequest(new XmlDocument(), _realm);

            _xmpp.SendRandomMulticast(xtr);
        }
Esempio n. 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);
        }