取消订阅

Syntax
UNSUBSCRIBE [channel [channel ...]]
Available since:
2.0.0
Time complexity:
O(N) where N is the number of channels to unsubscribe.
ACL categories:
@pubsub, @slow,

从给定的频道取消订阅客户端,如果没有给出频道,则从所有频道取消订阅。

当没有指定频道时,客户端将从所有先前订阅的频道中取消订阅。 在这种情况下,每个取消订阅的频道都会向客户端发送一条消息。

RESP2/RESP3 回复

When successful, this command doesn't return anything. Instead, for each channel, one message with the first element being the string unsubscribe is pushed as a confirmation that the command succeeded.
RATE THIS PAGE
Back to top ↑