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

Method subscribe

src/RedisView/RedisLib/RedisClient.cpp:560–569  ·  view source on GitHub ↗

* 订阅一个或多个频道 * @param[in] pattern 一个或多个频道 * @return * @see * @note */

Source from the content-addressed store, hash-verified

558 * @note
559 */
560void RedisClient::subscribe(const QString & channel) {
561 _sErrorInfo.clear();
562 _vCmdList.clear();
563 _vCmdList.push_back("SUBSCRIBE");
564 _vCmdList.push_back(channel);
565
566 _sendData.clear();
567 packRespCmd(_vCmdList,_sendData);
568 _redisTransMgr->write(_sendData);
569}
570
571/**
572 * 指示客户端退订给定的频道,如果没有频道被指定,也即是,一个无参数的UNSUBSCRIBE调用被执行,

Callers

nothing calls this directly

Calls 2

writeMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected