/* Collection of code snippets by Arne Vajhøj */
/* (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) */
#include <stdio.h>

#include <czmq.h>

#define TOPIC "1234"

int main(void)
{
    zsock_t *s;
    char respmsg[10000];
    int count;
    s = zsock_new_pub("tcp://*:10001");
    count = 0;
    for(;;)
    {
        count++;
        sprintf(respmsg, "%s C (high) server (%d)", TOPIC, count);
        zstr_send(s, respmsg);
        zmq_sleep(3);
    }
    return 0;
}
