[zeromq-dev] Easy way to send/recv messages?
Martin Sustrik
sustrik at 250bpm.com
Tue Aug 3 09:40:53 CEST 2010
Hi all,
Reading Pieter's manual to 0MQ messages here:
http://www.zeromq.org/docs:user-guide#toc9
I've come to realise how complex the whole thing is.
Now imagine there would be API that'll look like this:
int zmq_send (void *s, const void *buf, size_t len, int flags);
int zmq_recv (void *s, void *buf, size_t len, int flags);
Note the ease of use and the fact that it maps 1:1 to POSIX socket API.
Existing zero-copy message API can then be provided as a separate set of
functions:
int zmq_sendmsg (void *s, zmq_msg_t *msg, int flags);
int zmq_recvmsg (void *s, zmq_msg_t *msg, int flags);
The above would break backward compatibility so it's not an option now,
however, it looks like something to keep in mind for the future.
Martin
More information about the zeromq-dev
mailing list