• λ我爱Aspx >> Asp.Net >> RVP:存在和即时消息传送协议 (3)
  • RVP:存在和即时消息传送协议 (3)

  • :未知  Դ:internet  :2007-5-5 19:46:30  ؼ:
  • 只是在最初收件人(即本地服务器)接收 NOTIFY 消息时,发件人才请求确认。
  • DeepOr 发件人仅在最终目标之一接收到 NOTIFY 时才请求确认。此用法的一个示例是,当用户将一个 INSTANT MESSAGE 发送给委托人或者打印机缺纸时,要求系统管理员之一得到通知。
  • DeepAnd 发件人仅在所有最终目标接收到 NOTIFY 消息时才请求确认。此用法的一个示例是,消息被发送到一个组或分发列表,且有多个 WATCHERS 正在等待 NOTIFY 消息。
此外,在 NOTIFY 请求中,另一个标头是 RVP-Hop-Count。这是一个基于 1 的值,指定为产生此请求已经发生了多少次转发。 客户机->服务器 RVP-Hop-Count = 1 服务器->服务器 RVP-Hop-Count = 2 服务器->客户机 RVP-Hop-Count = 3

NOTIFY 方法使用新的 RVP XML 元素:message、propnotification、notification-from、notification-to、contact、description、msgbody 和 mime-data。

示例

此示例说明 PRESENTITY http://im.example.com/instmsg/aliases/deriks 如何将即时消息发送到 INSTANT INBOX http://im.acmewidgets.com/instmsg/aliases/maxb。

>>请求 NOTIFY /instmsg/aliases/maxb HTTP/1.1 Host: im.acmewidgets.com RVP-Notifications-Version: 0.2 RVP-Ack-Type: DeepOr RVP-Hop-Count: 1 RVP-From-Principal: http://im.example.com/instmsg/aliases/deriks Content-Type: text/xml Content-length: XXXX <?xml version="1.0"?> <D:notification xmlns:D="DAV:" xmlns:Z="http://schemas.microsoft.com/rvp/"> <Z:message> <Z:notification-from> <Z:contact> <D:href> http://im.example.com/instmsg/aliases/deriks </Z:href> <Z:description> Derik Stenerson </Z:description> </Z:contact> </Z:notification-from> <Z:notification-to> <Z:contact> <D:href> http://im.acmewidgets.com/instmsg/aliases/maxb</D:href> <Z:description> max </Z:description> </Z:contact> </Z:notification-to> <Z:msgbody> <Z:mime-data> <![CDATA[MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-MMS-IM-Format: FN=Microsoft%20Sans%20Serif; EF=; CO=0; CS=0; PF=22 Session-Id: {79FC61B5-1234-1234- 8A10-941F33CA4C90} Let's have lunch ]]> </Z:mime-data> </Z:msgbody> </Z:message> </Z:notification> >>响应 HTTP/1.1 200 Successful RVP-Notifications-Version: 0.2

Ҷƪл˵?
  • һƪRVP:存在和即时消息传送协议 (4)
    һƪRVP:存在和即时消息传送协议 (2)