Provide interface.

Also move iovec definition from implementation to interface.
Not clear to me at present if an incomplete type should
be used to avoid gratuitously including <sys/uio.h> in
the interface. The interface can't be used with this include.
This commit is contained in:
skaller 2012-02-08 12:58:35 +11:00
parent 383a49dadf
commit 970a005399
2 changed files with 14 additions and 10 deletions

View File

@ -215,6 +215,20 @@ 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);
// XSI vector I/O
#if ZMQ_HAVE_UIO
#include <sys/uio.h>
#else
struct iovec
{
void *iov_base;
size_t iov_len;
};
#endif
ZMQ_EXPORT int zmq_sendv (void *s, struct iovec *iov, size_t count, int flags);
ZMQ_EXPORT int zmq_recvmmsg (void *s, struct iovec *iov, size_t *count, int flags);
/******************************************************************************/
/* I/O multiplexing. */
/******************************************************************************/

View File

@ -50,16 +50,6 @@
#include <unistd.h>
#endif
// XSI vector I/O
#if ZMQ_HAVE_UIO
#include <sys/uio.h>
#else
struct iovec
{
void *iov_base;
size_t iov_len;
};
#endif
#include <string.h>
#include <errno.h>