起因:之前做移动端和pc端资源优先级(详细 http://wiki.jabbercn.org/RFC3921 中优先权 )不同,较低优先权的消息无法收到
参考作者在google group中的回复https://groups.google.com/forum/#!topic/xmppframework/vEmWjg3VOE
由于作者没有给出相应的api,所以只能手动添加。
在xmpp client中的goOnline中函数添加添加xml节点"priority"及取值,具体如下
- (void)goOnline
{
XMPPPresence *presence = [XMPPPresence presence]; // type="available" is implicit
//添加资源节点优先级
//参考网站:https://groups.google.com/forum/#!topic/xmppframework/vEmWjg3VOE
[presence addChild:[DDXMLNode elementWithName:@"priority" stringValue:@"1"]];
[ xmppStream sendElement:presence];
}