取消监听Websocket客户端上下线状态变化 - GoEasy PubSub

一个客户端执行该方法后,该客户端将不会再收到该channel上的客户端上下线状态变化。

    goeasy.pubsub.unsubscribePresence({
        channel: "my_channel",
        onSuccess: function () {  //取消监听成功
            console.log("Unsubscriber presence successfully.") 
        },
        onFailed: function (error) { //取消监听失败
            console.log("Failed to unsubscriber presence, code:"+error.code+ ",error:"+error.content);
        }
    });

results matching ""

    No results matching ""