summaryrefslogtreecommitdiff
path: root/perf/cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2009-09-16 11:02:18 +0200
committerMartin Sustrik <sustrik@fastmq.commkdir>2009-09-16 11:02:18 +0200
commit9c522dccaf0b2c8074bd96fbfb4c968f45748ba4 (patch)
treedc57d84016ab8b0d1abbd5291bde434d985ab48a /perf/cpp
parent6e03cb2f3eb083e1de8e7161d3ab21b52c87eece (diff)
reconnect added to zmq_connecter
Diffstat (limited to 'perf/cpp')
-rw-r--r--perf/cpp/remote_lat.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/perf/cpp/remote_lat.cpp b/perf/cpp/remote_lat.cpp
index f1d2a17..f6ccbb4 100644
--- a/perf/cpp/remote_lat.cpp
+++ b/perf/cpp/remote_lat.cpp
@@ -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);