首页 > 代码库 > agsXMPP参考代码

agsXMPP参考代码

agsXMPP

1.删除好友

XmppCon.RosterManager.RemoveRosterItem(node.RosterItem.Jid);

 

2.注销用户

        void userConn_OnLogin(object sender)        {            FireShowMsg(string.Format("{0} Login", userConn.MyJID.User));            RegisterIq rIq = new RegisterIq();            rIq.Type = IqType.set;            rIq.To = new Jid(userConn.Server);            rIq.Query.RemoveAccount = true;            userConn.IqGrabber.SendIq(rIq, new IqCB(OnRemoveAccountResult));        }        void OnRemoveAccountResult(object sender, IQ iq, object data)        {            userConn.Close();            FireShowMsg(string.Format("Remove Account:{0} OK",userConn.MyJID.User));        }