MCPcopy Create free account
hub / github.com/cc20110101/RedisView / unsubscribe

Method unsubscribe

src/RedisView/RedisLib/RedisClient.cpp:580–589  ·  view source on GitHub ↗

* 指示客户端退订给定的频道,如果没有频道被指定,也即是,一个无参数的UNSUBSCRIBE调用被执行, * 那么客户端使用SUBSCRIBE命令订阅的所有频道都会被退订。在这种情况下,命令会返回一个信息, * 告知客户端所有被退订的频道 * @param[in] channel 一个或多个频道 * @return * @see * @note */

Source from the content-addressed store, hash-verified

578 * @note
579 */
580void RedisClient::unsubscribe(const QString & channel) {
581 _sErrorInfo.clear();
582 _vCmdList.clear();
583 _vCmdList.push_back("UNSUBSCRIBE");
584 _vCmdList.push_back(channel);
585
586 _sendData.clear();
587 packRespCmd(_vCmdList,_sendData);
588 _redisTransMgr->write(_sendData);
589}
590
591/**
592 * 订阅一个或多个符合给定模式的频道。每个模式以*作为匹配符,比如it*匹配所有以it开头的频道

Callers

nothing calls this directly

Calls 2

writeMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected