mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 18:55:10 +01:00
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:
parent
383a49dadf
commit
970a005399
@ -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. */
|
||||
/******************************************************************************/
|
||||
|
10
src/zmq.cpp
10
src/zmq.cpp
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user