diff options
Diffstat (limited to 'perf')
-rw-r--r-- | perf/local_lat.cpp | 12 | ||||
-rw-r--r-- | perf/local_thr.cpp | 12 | ||||
-rw-r--r-- | perf/remote_lat.cpp | 12 | ||||
-rw-r--r-- | perf/remote_thr.cpp | 6 |
4 files changed, 21 insertions, 21 deletions
diff --git a/perf/local_lat.cpp b/perf/local_lat.cpp index 8d51662..999e799 100644 --- a/perf/local_lat.cpp +++ b/perf/local_lat.cpp @@ -68,18 +68,18 @@ int main (int argc, char *argv []) } for (i = 0; i != roundtrip_count; i++) { - rc = zmq_recv (s, &msg, 0); - if (rc != 0) { - printf ("error in zmq_recv: %s\n", zmq_strerror (errno)); + rc = zmq_recvmsg (s, &msg, 0); + if (rc < 0) { + printf ("error in zmq_recvmsg: %s\n", zmq_strerror (errno)); return -1; } if (zmq_msg_size (&msg) != message_size) { printf ("message of incorrect size received\n"); return -1; } - rc = zmq_send (s, &msg, 0); - if (rc != 0) { - printf ("error in zmq_send: %s\n", zmq_strerror (errno)); + rc = zmq_sendmsg (s, &msg, 0); + if (rc < 0) { + printf ("error in zmq_sendmsg: %s\n", zmq_strerror (errno)); return -1; } } diff --git a/perf/local_thr.cpp b/perf/local_thr.cpp index 0dea8c6..b5379d8 100644 --- a/perf/local_thr.cpp +++ b/perf/local_thr.cpp @@ -79,9 +79,9 @@ int main (int argc, char *argv []) return -1; } - rc = zmq_recv (s, &msg, 0); - if (rc != 0) { - printf ("error in zmq_recv: %s\n", zmq_strerror (errno)); + rc = zmq_recvmsg (s, &msg, 0); + if (rc < 0) { + printf ("error in zmq_recvmsg: %s\n", zmq_strerror (errno)); return -1; } if (zmq_msg_size (&msg) != message_size) { @@ -92,9 +92,9 @@ int main (int argc, char *argv []) watch = zmq_stopwatch_start (); for (i = 0; i != message_count - 1; i++) { - rc = zmq_recv (s, &msg, 0); - if (rc != 0) { - printf ("error in zmq_recv: %s\n", zmq_strerror (errno)); + rc = zmq_recvmsg (s, &msg, 0); + if (rc < 0) { + printf ("error in zmq_recvmsg: %s\n", zmq_strerror (errno)); return -1; } if (zmq_msg_size (&msg) != message_size) { diff --git a/perf/remote_lat.cpp b/perf/remote_lat.cpp index f353ed6..0d438e9 100644 --- a/perf/remote_lat.cpp +++ b/perf/remote_lat.cpp @@ -75,14 +75,14 @@ int main (int argc, char *argv []) watch = zmq_stopwatch_start (); for (i = 0; i != roundtrip_count; i++) { - rc = zmq_send (s, &msg, 0); - if (rc != 0) { - printf ("error in zmq_send: %s\n", zmq_strerror (errno)); + rc = zmq_sendmsg (s, &msg, 0); + if (rc < 0) { + printf ("error in zmq_sendmsg: %s\n", zmq_strerror (errno)); return -1; } - rc = zmq_recv (s, &msg, 0); - if (rc != 0) { - printf ("error in zmq_recv: %s\n", zmq_strerror (errno)); + rc = zmq_recvmsg (s, &msg, 0); + if (rc < 0) { + printf ("error in zmq_recvmsg: %s\n", zmq_strerror (errno)); return -1; } if (zmq_msg_size (&msg) != message_size) { diff --git a/perf/remote_thr.cpp b/perf/remote_thr.cpp index 78b8f72..ba36b98 100644 --- a/perf/remote_thr.cpp +++ b/perf/remote_thr.cpp @@ -76,9 +76,9 @@ int main (int argc, char *argv []) memset (zmq_msg_data (&msg), 0, message_size); #endif - rc = zmq_send (s, &msg, 0); - if (rc != 0) { - printf ("error in zmq_send: %s\n", zmq_strerror (errno)); + rc = zmq_sendmsg (s, &msg, 0); + if (rc < 0) { + printf ("error in zmq_sendmsg: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_msg_close (&msg); |