取消Websocket消息订阅 - GoEasy PubSub

一个客户端unsubscribe一个channel后,该客户端将不会接收这个channel的消息。

    goeasy.pubsub.unsubscribe({
        channel: "my_channel",
        onSuccess: function () {
            alert("订阅取消成功。");
        },
        onFailed: function (error) {
            alert("取消订阅失败,错误编码:" + error.code + " 错误信息:" + error.content)
        }
    });

results matching ""

    No results matching ""