|
|
@@ -875,6 +875,25 @@ bool CAttemperEngineSink::OnTCPSocketMainServiceInfo(WORD wSubCmdID, VOID * pDat |
|
|
|
//±äÁ¿¶¨Òå
|
|
|
|
CMD_CS_S_ServerOnLine * pServerOnLine = (CMD_CS_S_ServerOnLine *)pData;
|
|
|
|
|
|
|
|
//²âÊÔ´Óreids¶ÁÈ¡
|
|
|
|
//hmget
|
|
|
|
std::vector<std::string> filelds{ "wServerID","dwOnLineCount" };
|
|
|
|
//hmget
|
|
|
|
m_RedisClient->GetRedisClient()->hmget(string_format("Server_Info:%d", pServerOnLine->wServerID), filelds, [](cpp_redis::reply& reply) {
|
|
|
|
for (auto& res : reply.as_array())
|
|
|
|
{
|
|
|
|
std::cout << res.as_string() << std::endl;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
//hgetall
|
|
|
|
m_RedisClient->GetRedisClient()->hgetall(string_format("Server_Info:%d", pServerOnLine->wServerID), [](const cpp_redis::reply& reply) {
|
|
|
|
for (auto& res : reply.as_array())
|
|
|
|
{
|
|
|
|
//std::cout << res << std::endl;
|
|
|
|
std::cout << res.as_string() << std::endl;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
//²éÕÒ·¿¼ä
|
|
|
|
CGameServerItem * pGameServerItem = m_ServerListManager.SearchGameServer(pServerOnLine->wServerID);
|
|
|
|
if (pGameServerItem == NULL) return true;
|
|
|
|