summaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/zmq.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/zmq.h b/include/zmq.h
index 6f8e766..cd1bc90 100644
--- a/include/zmq.h
+++ b/include/zmq.h
@@ -216,8 +216,10 @@ ZMQ_EXPORT int zmq_getsockopt (void *s, int option, void *optval,
size_t *optvallen);
ZMQ_EXPORT int zmq_bind (void *s, const char *addr);
ZMQ_EXPORT int zmq_connect (void *s, const char *addr);
-ZMQ_EXPORT int zmq_send (void *s, zmq_msg_t *msg, int flags);
-ZMQ_EXPORT int zmq_recv (void *s, zmq_msg_t *msg, int flags);
+ZMQ_EXPORT int zmq_send (void *s, const void *buf, size_t len, int flags);
+ZMQ_EXPORT int zmq_recv (void *s, void *buf, size_t len, int flags);
+ZMQ_EXPORT int zmq_sendmsg (void *s, zmq_msg_t *msg, int flags);
+ZMQ_EXPORT int zmq_recvmsg (void *s, zmq_msg_t *msg, int flags);
/******************************************************************************/
/* I/O multiplexing. */