agsXMPP中的例子已經有註冊、登陸、添加好友、接收好友添加請求、發送消息、接收消息等功能。code
登陸後可用如下方法修改密碼xml
IQ iq = new IQ(IqType.set); Register riq = new Register(); riq.Username = "Username"; riq.Password = "Password"; iq.Query = riq; XmppClientConnection.Send(iq);
此代碼生成的xml爲:blog
<query xmlns="jabber:iq:register"><username>yhcao</username><password>yhcao1</password></query>