* 订阅一个或多个频道 * @param[in] pattern 一个或多个频道 * @return * @see * @note */
| 558 | * @note |
| 559 | */ |
| 560 | void 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调用被执行, |