Poking at zeromq stuff again
found some tabs! eeeek!
This commit is contained in:
parent
6279bfa4bf
commit
ccac55c639
@ -1,17 +1,21 @@
|
|||||||
#include <zmq.h>
|
#include <zmq.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#define BIND_ADDR "tcp://*:5555"
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
void *context = zmq_init(1);
|
void *context = zmq_init(1);
|
||||||
|
|
||||||
void *responder = zmq_socket(context, ZMQ_REP);
|
void *responder = zmq_socket(context, ZMQ_REP);
|
||||||
printf("Binding server to tcp://*:5555\n");
|
printf("Binding server to %s\n", BIND_ADDR);
|
||||||
zmq_bind(responder, "tcp://*:5555");
|
printf("pid=%d\n", getpid());
|
||||||
|
zmq_bind(responder, BIND_ADDR);
|
||||||
|
|
||||||
printf("Starting loop.\n");
|
printf("Starting loop.\n");
|
||||||
while(1) {
|
while(1) {
|
||||||
zmq_msg_t request;
|
zmq_msg_t request;
|
||||||
zmq_msg_init(&request);
|
zmq_msg_init(&request);
|
||||||
|
Loading…
Reference in New Issue
Block a user