/// <summary>Used to send data over Xmpp using the specified XmppEdge.</summary> public void HandleEdgeSend(Edge from, ICopyable data) { XmppEdge xe = from as XmppEdge; byte[] msg = new byte[xe.Header.Length + data.Length]; xe.Header.CopyTo(msg, 0); data.CopyTo(msg, xe.Header.Length); _xmpp.SendTo(new XmppRelay(new XmlDocument(), msg), xe.To); }
/// <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); }