This commit is contained in:
Vincent Batts 2012-07-16 14:41:18 -04:00
parent c8f56b8b52
commit 63ff276544
3 changed files with 4 additions and 3 deletions

View file

@ -1,4 +1,4 @@
#CXXFLAGS += -fpermissive
CXXFLAGS += -fpermissive
LDFLAGS += -lzmq
all: main

View file

@ -19,7 +19,7 @@ int main(int ac, char** av)
return 1;
}
zmq::socket_t s (ctx, ZMQ_REQ);
s.connect ("tcp://localhost:5555");
s.connect ("tcp://127.0.0.1:5555");
zmq::message_t request (10);
memset (request.data (), 0, request.size ());
s.send (request);

View file

@ -25,7 +25,8 @@ void *worker_routine (void *arg)
}
int main(int ac, char** av) {
zmq::context_t ctx (1);
int threads = 5;
zmq::context_t ctx (threads);
zmq::socket_t workers (ctx, ZMQ_XREQ);
workers.bind ("inproc://workers");