hello all
I am new to zeromq, tried to compile/run the server/client example in C.
While i was able to compile I had issues executing the server, got a seg fault on the assert(rc ==0) (see code below), wanted to ask what the purpose of the assertion was ?
I was able to get the example to work when I comment out the assert command
On Ubuntu 20.04 LTS, using czmq
// Hello World server
#include <czmq.h>
int main (void)
{
// Socket to talk to clients
zsock_t *responder = zsock_new (ZMQ_REP);
int rc = zsock_bind (responder, "tcp://*:5555");
assert (rc == 0);
while (1) {
char *str = zstr_recv (responder);
printf ("Received Hello\n");
sleep (1); // Do some 'work'
zstr_send (responder, "World");
zstr_free (&str);
}
return 0;
}