add example websocket C++ server snake which supports basic cobra ops (publish and subscribe without stream sql

This commit is contained in:
Benjamin Sergeant
2019-04-22 17:24:01 -07:00
parent 323684efff
commit 0caf875399
19 changed files with 846 additions and 20 deletions

View File

@ -36,13 +36,14 @@ namespace ix
std::cout << "Auth response: " << authResponse << ":" << port << std::endl;
}
std::string errMsg;
for (int i = 0; i < count; i++)
{
//std::cerr << "Publishing message " << message
// << " to " << channel << "..." << std::endl;
if (!redisClient.publish(channel, message))
if (!redisClient.publish(channel, message, errMsg))
{
std::cerr << "Error publishing to channel " << channel << std::endl;
std::cerr << "Error publishing to channel " << channel
<< "error: " << errMsg
<< std::endl;
return 1;
}
}