【问题标题】:How to know that when the user goes offline in AgsXMPP?如何知道用户在 AgsXMPP 中何时下线?
【发布时间】:2012-02-06 06:25:20
【问题描述】:

我目前正在尝试使用 agsXMPP 库, 我在 OnPresence 事件上将用户添加到树节点。 它运行良好,但是当其他用户离线时,我想更新树节点, 为此我需要他的离线状态,当聊天伙伴离线时我如何获得结果?

【问题讨论】:

    标签: xmpp offline agsxmpp


    【解决方案1】:

    当好友下线时,您会收到类型为不可用的 OnPresence 事件。

    private void XmppCon_OnPresence(object sender, Presence pres)
    {
        if (pres.Type == PresenceType.unavailable)
        {
            // user goes offline
        }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多