diff options
Diffstat (limited to 'bindings')
| -rw-r--r-- | bindings/c/zmq.h | 24 | 
1 files changed, 12 insertions, 12 deletions
| diff --git a/bindings/c/zmq.h b/bindings/c/zmq.h index 056d89a..f42f7f9 100644 --- a/bindings/c/zmq.h +++ b/bindings/c/zmq.h @@ -80,21 +80,21 @@ ZMQ_EXPORT const char *zmq_strerror (int errnum);  //  rather than straighforward malloc/free. Not that 'content' is not a pointer  //  to the raw data. Rather it is pointer to zmq::msg_content_t structure  //  (see src/msg_content.hpp for its definition). -struct zmq_msg_t +typedef struct  {      void *content;      unsigned char shared;      unsigned char vsm_size;      unsigned char vsm_data [ZMQ_MAX_VSM_SIZE]; -}; +} zmq_msg_t;  //  Initialise an empty message (zero bytes long). -ZMQ_EXPORT int zmq_msg_init (struct zmq_msg_t *msg); +ZMQ_EXPORT int zmq_msg_init (zmq_msg_t *msg);  //  Initialise a message 'size' bytes long.  //  //  Errors: ENOMEM - message is too big to fit into memory. -ZMQ_EXPORT int zmq_msg_init_size (struct zmq_msg_t *msg, size_t size); +ZMQ_EXPORT int zmq_msg_init_size (zmq_msg_t *msg, size_t size);  //  Initialise a message from an existing buffer. Message isn't copied,  //  instead 0MQ infrastructure takes ownership of the buffer and @@ -102,28 +102,28 @@ ZMQ_EXPORT int zmq_msg_init_size (struct zmq_msg_t *msg, size_t size);  //  needed anymore. Note that deallocation function prototype is designed  //  so that it complies with standard C 'free' function.  typedef void (zmq_free_fn) (void *data); -ZMQ_EXPORT int zmq_msg_init_data (struct zmq_msg_t *msg, void *data, +ZMQ_EXPORT int zmq_msg_init_data (zmq_msg_t *msg, void *data,      size_t size, zmq_free_fn *ffn);  //  Deallocate the message. -ZMQ_EXPORT int zmq_msg_close (struct zmq_msg_t *msg); +ZMQ_EXPORT int zmq_msg_close (zmq_msg_t *msg);  //  Move the content of the message from 'src' to 'dest'. The content isn't  //  copied, just moved. 'src' is an empty message after the call. Original  //  content of 'dest' message is deallocated. -ZMQ_EXPORT int zmq_msg_move (struct zmq_msg_t *dest, struct zmq_msg_t *src); +ZMQ_EXPORT int zmq_msg_move (zmq_msg_t *dest, zmq_msg_t *src);  //  Copy the 'src' message to 'dest'. The content isn't copied, instead  //  reference count is increased. Don't modify the message data after the  //  call as they are shared between two messages. Original content of 'dest'  //  message is deallocated. -ZMQ_EXPORT int zmq_msg_copy (struct zmq_msg_t *dest, struct zmq_msg_t *src); +ZMQ_EXPORT int zmq_msg_copy (zmq_msg_t *dest, zmq_msg_t *src);  //  Returns pointer to message data. -ZMQ_EXPORT void *zmq_msg_data (struct zmq_msg_t *msg); +ZMQ_EXPORT void *zmq_msg_data (zmq_msg_t *msg);  //  Return size of message data (in bytes). -ZMQ_EXPORT size_t zmq_msg_size (struct zmq_msg_t *msg); +ZMQ_EXPORT size_t zmq_msg_size (zmq_msg_t *msg);  ////////////////////////////////////////////////////////////////////////////////  //  0MQ infrastructure (a.k.a. context) initialisation & termination. @@ -336,7 +336,7 @@ ZMQ_EXPORT int zmq_connect (void *s, const char *addr);  //                   non-blocking send).  //          ENOTSUP - function isn't supported by particular socket type.  //          EFSM - function cannot be called at the moment.  -ZMQ_EXPORT int zmq_send (void *s, struct zmq_msg_t *msg, int flags); +ZMQ_EXPORT int zmq_send (void *s, zmq_msg_t *msg, int flags);  //  Flush the messages that were send using ZMQ_NOFLUSH flag down the stream.  // @@ -351,7 +351,7 @@ ZMQ_EXPORT int zmq_flush (void *s);  //                   non-blocking receive).  //          ENOTSUP - function isn't supported by particular socket type.  //          EFSM - function cannot be called at the moment.  -ZMQ_EXPORT int zmq_recv (void *s, struct zmq_msg_t *msg, int flags); +ZMQ_EXPORT int zmq_recv (void *s, zmq_msg_t *msg, int flags);  ////////////////////////////////////////////////////////////////////////////////  //  Helper functions. | 
