reconnect added to zmq_connecter

This commit is contained in:
Martin Sustrik
2009-09-16 11:02:18 +02:00
parent 6e03cb2f3e
commit 9c522dccaf
11 changed files with 66 additions and 20 deletions

View File

@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <assert.h>
#include <stddef.h>
#include <string.h>
int main (int argc, char *argv [])
{
@@ -39,10 +40,12 @@ int main (int argc, char *argv [])
zmq::socket_t s (ctx, ZMQ_REQ);
s.connect (connect_to);
zmq::message_t msg (message_size);
memset (msg.data (), 0, message_size);
void *watch = zmq_stopwatch_start ();
for (int i = 0; i != roundtrip_count; i++) {
zmq::message_t msg (message_size);
s.send (msg);
s.recv (&msg);
assert (msg.size () == message_size);