54 rc =
zmq_bind (to,
"tcp://127.0.0.1:6555");
74 for (
int i = 0; i < 10; ++i) {
87 rc =
zmq_recv (to, &buffer,
sizeof (buffer), 0);
115 rc =
zmq_bind (to,
"tcp://127.0.0.1:5560");
143 for (
int i = 0; i < 10; ++i) {
144 rc =
zmq_send (from,
"Hello", 5, 0);
152 rc =
zmq_recv (to, &buffer,
sizeof (buffer), 0);
189 rc =
zmq_bind (backend,
"tcp://127.0.0.1:5560");
191 rc =
zmq_connect (frontend,
"tcp://localhost:5560");
195 rc =
zmq_send (backend,
"Hello", 5, 0);
197 rc =
zmq_recv (frontend, buffer, 255, 0);
219 rc =
zmq_bind (backend,
"tcp://127.0.0.1:5560");
223 rc =
zmq_send (backend,
"Hello", 5, 0);
225 rc =
zmq_recv (frontend, buffer, 255, 0);
void msleep(int milliseconds)
ZMQ_EXPORT int zmq_setsockopt(void *s, int option, const void *optval, size_t optvallen)
ZMQ_EXPORT void * zmq_ctx_new(void)
void setup_test_environment(void)
ZMQ_EXPORT int zmq_recv(void *s, void *buf, size_t len, int flags)
ZMQ_EXPORT void * zmq_socket(void *, int type)
ZMQ_EXPORT int zmq_connect(void *s, const char *addr)
ZMQ_EXPORT int zmq_close(void *s)
ZMQ_EXPORT int zmq_send(void *s, const void *buf, size_t len, int flags)
ZMQ_EXPORT int zmq_bind(void *s, const char *addr)
ZMQ_EXPORT int zmq_ctx_term(void *context)