diff --git a/zeromq/hwserver.c b/zeromq/hwserver.c index 1401470..3e9cea2 100644 --- a/zeromq/hwserver.c +++ b/zeromq/hwserver.c @@ -1,17 +1,21 @@ #include #include +#include #include #include +#define BIND_ADDR "tcp://*:5555" + int main(void) { void *context = zmq_init(1); void *responder = zmq_socket(context, ZMQ_REP); - printf("Binding server to tcp://*:5555\n"); - zmq_bind(responder, "tcp://*:5555"); + printf("Binding server to %s\n", BIND_ADDR); + printf("pid=%d\n", getpid()); + zmq_bind(responder, BIND_ADDR); - printf("Starting loop.\n"); + printf("Starting loop.\n"); while(1) { zmq_msg_t request; zmq_msg_init(&request);