29 lines
446 B
C
29 lines
446 B
C
|
#include "redisMq.h"
|
||
|
|
||
|
int main(int argc, char *argv[])
|
||
|
{
|
||
|
bool ret = redisPubInit();
|
||
|
if (!ret)
|
||
|
{
|
||
|
printf("Init failed.\n");
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
ret = redisPubConnect();
|
||
|
if (!ret)
|
||
|
{
|
||
|
printf("connect failed.");
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
//while (true)
|
||
|
{
|
||
|
//redisPublish("test-channel", "Test message");
|
||
|
sleep(1);
|
||
|
}
|
||
|
|
||
|
redisPubDisconnect();
|
||
|
redisPubUninit();
|
||
|
return 0;
|
||
|
}
|