summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/p2p.cpp4
-rw-r--r--src/p2p.hpp4
-rw-r--r--src/pipe.cpp2
-rw-r--r--src/pipe.hpp4
-rw-r--r--src/pub.cpp4
-rw-r--r--src/pub.hpp4
-rw-r--r--src/rep.cpp4
-rw-r--r--src/rep.hpp4
-rw-r--r--src/req.cpp4
-rw-r--r--src/req.hpp4
-rw-r--r--src/socket_base.hpp10
-rw-r--r--src/sub.cpp4
-rw-r--r--src/sub.hpp6
13 files changed, 30 insertions, 28 deletions
diff --git a/src/p2p.cpp b/src/p2p.cpp
index f403041..c43b7b4 100644
--- a/src/p2p.cpp
+++ b/src/p2p.cpp
@@ -66,7 +66,7 @@ int zmq::p2p_t::xsetsockopt (int option_, const void *optval_,
return -1;
}
-int zmq::p2p_t::xsend (struct zmq_msg_t *msg_, int flags_)
+int zmq::p2p_t::xsend (zmq_msg_t *msg_, int flags_)
{
zmq_assert (false);
return 0;
@@ -78,7 +78,7 @@ int zmq::p2p_t::xflush ()
return 0;
}
-int zmq::p2p_t::xrecv (struct zmq_msg_t *msg_, int flags_)
+int zmq::p2p_t::xrecv (zmq_msg_t *msg_, int flags_)
{
zmq_assert (false);
return 0;
diff --git a/src/p2p.hpp b/src/p2p.hpp
index a3dae31..1c98dd5 100644
--- a/src/p2p.hpp
+++ b/src/p2p.hpp
@@ -39,9 +39,9 @@ namespace zmq
void xkill (class reader_t *pipe_);
void xrevive (class reader_t *pipe_);
int xsetsockopt (int option_, const void *optval_, size_t optvallen_);
- int xsend (struct zmq_msg_t *msg_, int flags_);
+ int xsend (zmq_msg_t *msg_, int flags_);
int xflush ();
- int xrecv (struct zmq_msg_t *msg_, int flags_);
+ int xrecv (zmq_msg_t *msg_, int flags_);
private:
diff --git a/src/pipe.cpp b/src/pipe.cpp
index 9f70586..f8dfcb8 100644
--- a/src/pipe.cpp
+++ b/src/pipe.cpp
@@ -106,7 +106,7 @@ bool zmq::writer_t::check_write (uint64_t size_)
return true;
}
-bool zmq::writer_t::write (struct zmq_msg_t *msg_)
+bool zmq::writer_t::write (zmq_msg_t *msg_)
{
pipe->write (*msg_);
return true;
diff --git a/src/pipe.hpp b/src/pipe.hpp
index 177b1b4..699e3f7 100644
--- a/src/pipe.hpp
+++ b/src/pipe.hpp
@@ -43,7 +43,7 @@ namespace zmq
void set_endpoint (i_endpoint *endpoint_);
// Reads a message to the underlying pipe.
- bool read (struct zmq_msg_t *msg_);
+ bool read (zmq_msg_t *msg_);
// Ask pipe to terminate.
void term ();
@@ -93,7 +93,7 @@ namespace zmq
// Writes a message to the underlying pipe. Returns false if the
// message cannot be written because high watermark was reached.
- bool write (struct zmq_msg_t *msg_);
+ bool write (zmq_msg_t *msg_);
// Flush the messages downsteam.
void flush ();
diff --git a/src/pub.cpp b/src/pub.cpp
index a403157..1e66a18 100644
--- a/src/pub.cpp
+++ b/src/pub.cpp
@@ -72,7 +72,7 @@ int zmq::pub_t::xsetsockopt (int option_, const void *optval_,
return -1;
}
-int zmq::pub_t::xsend (struct zmq_msg_t *msg_, int flags_)
+int zmq::pub_t::xsend (zmq_msg_t *msg_, int flags_)
{
out_pipes_t::size_type pipes_count = out_pipes.size ();
@@ -150,7 +150,7 @@ int zmq::pub_t::xflush ()
return 0;
}
-int zmq::pub_t::xrecv (struct zmq_msg_t *msg_, int flags_)
+int zmq::pub_t::xrecv (zmq_msg_t *msg_, int flags_)
{
errno = ENOTSUP;
return -1;
diff --git a/src/pub.hpp b/src/pub.hpp
index c5eeac1..07eb5a1 100644
--- a/src/pub.hpp
+++ b/src/pub.hpp
@@ -40,9 +40,9 @@ namespace zmq
void xkill (class reader_t *pipe_);
void xrevive (class reader_t *pipe_);
int xsetsockopt (int option_, const void *optval_, size_t optvallen_);
- int xsend (struct zmq_msg_t *msg_, int flags_);
+ int xsend (zmq_msg_t *msg_, int flags_);
int xflush ();
- int xrecv (struct zmq_msg_t *msg_, int flags_);
+ int xrecv (zmq_msg_t *msg_, int flags_);
private:
diff --git a/src/rep.cpp b/src/rep.cpp
index 7ebbc6d..137c735 100644
--- a/src/rep.cpp
+++ b/src/rep.cpp
@@ -134,7 +134,7 @@ int zmq::rep_t::xsetsockopt (int option_, const void *optval_,
return -1;
}
-int zmq::rep_t::xsend (struct zmq_msg_t *msg_, int flags_)
+int zmq::rep_t::xsend (zmq_msg_t *msg_, int flags_)
{
if (!waiting_for_reply) {
errno = EFSM;
@@ -165,7 +165,7 @@ int zmq::rep_t::xflush ()
return -1;
}
-int zmq::rep_t::xrecv (struct zmq_msg_t *msg_, int flags_)
+int zmq::rep_t::xrecv (zmq_msg_t *msg_, int flags_)
{
// Deallocate old content of the message.
zmq_msg_close (msg_);
diff --git a/src/rep.hpp b/src/rep.hpp
index 07bdaf4..4781213 100644
--- a/src/rep.hpp
+++ b/src/rep.hpp
@@ -40,9 +40,9 @@ namespace zmq
void xkill (class reader_t *pipe_);
void xrevive (class reader_t *pipe_);
int xsetsockopt (int option_, const void *optval_, size_t optvallen_);
- int xsend (struct zmq_msg_t *msg_, int flags_);
+ int xsend (zmq_msg_t *msg_, int flags_);
int xflush ();
- int xrecv (struct zmq_msg_t *msg_, int flags_);
+ int xrecv (zmq_msg_t *msg_, int flags_);
private:
diff --git a/src/req.cpp b/src/req.cpp
index 3fd9b38..63409ce 100644
--- a/src/req.cpp
+++ b/src/req.cpp
@@ -115,7 +115,7 @@ int zmq::req_t::xsetsockopt (int option_, const void *optval_,
return -1;
}
-int zmq::req_t::xsend (struct zmq_msg_t *msg_, int flags_)
+int zmq::req_t::xsend (zmq_msg_t *msg_, int flags_)
{
// If we've sent a request and we still haven't got the reply,
// we can't send another request.
@@ -170,7 +170,7 @@ int zmq::req_t::xflush ()
return -1;
}
-int zmq::req_t::xrecv (struct zmq_msg_t *msg_, int flags_)
+int zmq::req_t::xrecv (zmq_msg_t *msg_, int flags_)
{
// Deallocate old content of the message.
zmq_msg_close (msg_);
diff --git a/src/req.hpp b/src/req.hpp
index 95ddf0d..3ae78fd 100644
--- a/src/req.hpp
+++ b/src/req.hpp
@@ -40,9 +40,9 @@ namespace zmq
void xkill (class reader_t *pipe_);
void xrevive (class reader_t *pipe_);
int xsetsockopt (int option_, const void *optval_, size_t optvallen_);
- int xsend (struct zmq_msg_t *msg_, int flags_);
+ int xsend (zmq_msg_t *msg_, int flags_);
int xflush ();
- int xrecv (struct zmq_msg_t *msg_, int flags_);
+ int xrecv (zmq_msg_t *msg_, int flags_);
private:
diff --git a/src/socket_base.hpp b/src/socket_base.hpp
index bba27c3..c54efae 100644
--- a/src/socket_base.hpp
+++ b/src/socket_base.hpp
@@ -25,6 +25,8 @@
#include <vector>
#include <string>
+#include "../bindings/c/zmq.h"
+
#include "i_endpoint.hpp"
#include "object.hpp"
#include "yarray_item.hpp"
@@ -47,9 +49,9 @@ namespace zmq
size_t optvallen_);
int bind (const char *addr_);
int connect (const char *addr_);
- int send (struct zmq_msg_t *msg_, int flags_);
+ int send (zmq_msg_t *msg_, int flags_);
int flush ();
- int recv (struct zmq_msg_t *msg_, int flags_);
+ int recv (zmq_msg_t *msg_, int flags_);
int close ();
// The list of sessions cannot be accessed via inter-thread
@@ -83,9 +85,9 @@ namespace zmq
// Actual algorithms are to be defined by individual socket types.
virtual int xsetsockopt (int option_, const void *optval_,
size_t optvallen_) = 0;
- virtual int xsend (struct zmq_msg_t *msg_, int options_) = 0;
+ virtual int xsend (zmq_msg_t *msg_, int options_) = 0;
virtual int xflush () = 0;
- virtual int xrecv (struct zmq_msg_t *msg_, int options_) = 0;
+ virtual int xrecv (zmq_msg_t *msg_, int options_) = 0;
// Socket options.
options_t options;
diff --git a/src/sub.cpp b/src/sub.cpp
index abd9deb..1bfbcd5 100644
--- a/src/sub.cpp
+++ b/src/sub.cpp
@@ -122,7 +122,7 @@ int zmq::sub_t::xsetsockopt (int option_, const void *optval_,
return -1;
}
-int zmq::sub_t::xsend (struct zmq_msg_t *msg_, int flags_)
+int zmq::sub_t::xsend (zmq_msg_t *msg_, int flags_)
{
errno = ENOTSUP;
return -1;
@@ -134,7 +134,7 @@ int zmq::sub_t::xflush ()
return -1;
}
-int zmq::sub_t::xrecv (struct zmq_msg_t *msg_, int flags_)
+int zmq::sub_t::xrecv (zmq_msg_t *msg_, int flags_)
{
while (true) {
diff --git a/src/sub.hpp b/src/sub.hpp
index 180391d..8691928 100644
--- a/src/sub.hpp
+++ b/src/sub.hpp
@@ -45,15 +45,15 @@ namespace zmq
void xkill (class reader_t *pipe_);
void xrevive (class reader_t *pipe_);
int xsetsockopt (int option_, const void *optval_, size_t optvallen_);
- int xsend (struct zmq_msg_t *msg_, int flags_);
+ int xsend (zmq_msg_t *msg_, int flags_);
int xflush ();
- int xrecv (struct zmq_msg_t *msg_, int flags_);
+ int xrecv (zmq_msg_t *msg_, int flags_);
private:
// Helper function to return one message choosed using
// fair queueing algorithm.
- int fq (struct zmq_msg_t *msg_, int flags_);
+ int fq (zmq_msg_t *msg_, int flags_);
// Inbound pipes, i.e. those the socket is getting messages from.
typedef yarray_t <class reader_t> in_pipes_t;