summaryrefslogtreecommitdiff
path: root/perf/remote_thr.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-03-24 11:53:55 +0100
committerMartin Sustrik <sustrik@250bpm.com>2011-03-24 11:53:55 +0100
commitfb27a000d9383b503761d0124e7bd41115d70c9a (patch)
treee330e2f828cd0f62843d0f75892aff56289effda /perf/remote_thr.cpp
parentd4e83d26014f41eaa1698b4062de88fe7f36a669 (diff)
send/recv was changed to send/recv/sendmsg/recvmsg
send/recv now complies with POSIX by using raw buffers instead of message objects and by returning number of bytes sent/recvd instead of 0/-1. The return value is changed accordingly for sendmsg and recvmsg. Note that related man pages will be fixed in a separate patch. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'perf/remote_thr.cpp')
-rw-r--r--perf/remote_thr.cpp6
1 files changed, 3 insertions, 3 deletions
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);