论坛首页 综合技术论坛

添加好友时, set roster是可选的。只发送 type=subscribe的presence即可

浏览 1060 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2014-09-03  
 
添加好友时, set roster是可选的。只发送 type=subscribe的presence即可。 set roster 也只是为了添加昵称和分组用的
有同事问起,结果忘记了,就又翻阅了一下文档,如下描述

Implementation Note: Many XMPP clients prompt the user for information about the potential contact (e.g., "handle" and desired roster group) when generating an outbound presence subscription request and therefore send a roster set before sending the outbound presence subscription request. This behavior is OPTIONAL, because a client MAY instead wait until receiving the initial roster push from the server before uploading user-provided information about the contact. A server MUST process a roster set and outbound presence subscription request in either order (i.e., in whatever order generated by the client).

论坛首页 综合技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics