小编use*_*490的帖子

Zeromq: PUB/SUB program using zmq, no exchange of messages

I have written a simple PUB/SUB program in zmq which is not working. In server.c, all I am doing is binding server to specific socket and then broadcasting a message "Hi!, Similarly, in client.c, I am receving the sent string and printing it but it always skips the loop. When I run client it does not receive any message from server.c. What could possibly be wrong?

//server.c
#include <zmq.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>

int main (void)
{
    // …
Run Code Online (Sandbox Code Playgroud)

c ubuntu tcp localhost zeromq

3
推荐指数
1
解决办法
5181
查看次数

标签 统计

c ×1

localhost ×1

tcp ×1

ubuntu ×1

zeromq ×1