Commit 8ef7fbb4 authored by Ian Barber's avatar Ian Barber

Merge pull request #638 from shawnjgoff/master

Change name of icanhasall to subscribe_to_all
parents 82a00e3a 6a18f595
...@@ -32,10 +32,10 @@ zmq::dealer_t::~dealer_t () ...@@ -32,10 +32,10 @@ zmq::dealer_t::~dealer_t ()
{ {
} }
void zmq::dealer_t::xattach_pipe (pipe_t *pipe_, bool icanhasall_) void zmq::dealer_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_)
{ {
// icanhasall_ is unused // subscribe_to_all_ is unused
(void) icanhasall_; (void) subscribe_to_all_;
zmq_assert (pipe_); zmq_assert (pipe_);
......
...@@ -45,7 +45,7 @@ namespace zmq ...@@ -45,7 +45,7 @@ namespace zmq
protected: protected:
// Overloads of functions from socket_base_t. // Overloads of functions from socket_base_t.
void xattach_pipe (zmq::pipe_t *pipe_, bool icanhasall_); void xattach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_);
int xsetsockopt (int option_, const void *optval_, size_t optvallen_); int xsetsockopt (int option_, const void *optval_, size_t optvallen_);
int xsend (zmq::msg_t *msg_); int xsend (zmq::msg_t *msg_);
int xrecv (zmq::msg_t *msg_); int xrecv (zmq::msg_t *msg_);
......
...@@ -34,10 +34,10 @@ zmq::pair_t::~pair_t () ...@@ -34,10 +34,10 @@ zmq::pair_t::~pair_t ()
zmq_assert (!pipe); zmq_assert (!pipe);
} }
void zmq::pair_t::xattach_pipe (pipe_t *pipe_, bool icanhasall_) void zmq::pair_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_)
{ {
// icanhasall_ is unused // subscribe_to_all_ is unused
(void)icanhasall_; (void)subscribe_to_all_;
zmq_assert (pipe_ != NULL); zmq_assert (pipe_ != NULL);
......
...@@ -40,7 +40,7 @@ namespace zmq ...@@ -40,7 +40,7 @@ namespace zmq
~pair_t (); ~pair_t ();
// Overloads of functions from socket_base_t. // Overloads of functions from socket_base_t.
void xattach_pipe (zmq::pipe_t *pipe_, bool icanhasall_); void xattach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_);
int xsend (zmq::msg_t *msg_); int xsend (zmq::msg_t *msg_);
int xrecv (zmq::msg_t *msg_); int xrecv (zmq::msg_t *msg_);
bool xhas_in (); bool xhas_in ();
......
...@@ -32,10 +32,10 @@ zmq::pull_t::~pull_t () ...@@ -32,10 +32,10 @@ zmq::pull_t::~pull_t ()
{ {
} }
void zmq::pull_t::xattach_pipe (pipe_t *pipe_, bool icanhasall_) void zmq::pull_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_)
{ {
// icanhasall_ is unused // subscribe_to_all_ is unused
(void)icanhasall_; (void)subscribe_to_all_;
zmq_assert (pipe_); zmq_assert (pipe_);
fq.attach (pipe_); fq.attach (pipe_);
......
...@@ -43,7 +43,7 @@ namespace zmq ...@@ -43,7 +43,7 @@ namespace zmq
protected: protected:
// Overloads of functions from socket_base_t. // Overloads of functions from socket_base_t.
void xattach_pipe (zmq::pipe_t *pipe_, bool icanhasall_); void xattach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_);
int xrecv (zmq::msg_t *msg_); int xrecv (zmq::msg_t *msg_);
bool xhas_in (); bool xhas_in ();
void xread_activated (zmq::pipe_t *pipe_); void xread_activated (zmq::pipe_t *pipe_);
......
...@@ -32,10 +32,10 @@ zmq::push_t::~push_t () ...@@ -32,10 +32,10 @@ zmq::push_t::~push_t ()
{ {
} }
void zmq::push_t::xattach_pipe (pipe_t *pipe_, bool icanhasall_) void zmq::push_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_)
{ {
// icanhasall_ is unused // subscribe_to_all_ is unused
(void)icanhasall_; (void)subscribe_to_all_;
zmq_assert (pipe_); zmq_assert (pipe_);
lb.attach (pipe_); lb.attach (pipe_);
......
...@@ -43,7 +43,7 @@ namespace zmq ...@@ -43,7 +43,7 @@ namespace zmq
protected: protected:
// Overloads of functions from socket_base_t. // Overloads of functions from socket_base_t.
void xattach_pipe (zmq::pipe_t *pipe_, bool icanhasall_); void xattach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_);
int xsend (zmq::msg_t *msg_); int xsend (zmq::msg_t *msg_);
bool xhas_out (); bool xhas_out ();
void xwrite_activated (zmq::pipe_t *pipe_); void xwrite_activated (zmq::pipe_t *pipe_);
......
...@@ -53,10 +53,10 @@ zmq::router_t::~router_t () ...@@ -53,10 +53,10 @@ zmq::router_t::~router_t ()
prefetched_msg.close (); prefetched_msg.close ();
} }
void zmq::router_t::xattach_pipe (pipe_t *pipe_, bool icanhasall_) void zmq::router_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_)
{ {
// icanhasall_ is unused // subscribe_to_all_ is unused
(void)icanhasall_; (void)subscribe_to_all_;
zmq_assert (pipe_); zmq_assert (pipe_);
......
...@@ -45,7 +45,7 @@ namespace zmq ...@@ -45,7 +45,7 @@ namespace zmq
~router_t (); ~router_t ();
// Overloads of functions from socket_base_t. // Overloads of functions from socket_base_t.
void xattach_pipe (zmq::pipe_t *pipe_, bool icanhasall_); void xattach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_);
int xsetsockopt (int option_, const void *optval_, size_t optvallen_); int xsetsockopt (int option_, const void *optval_, size_t optvallen_);
int xsend (zmq::msg_t *msg_); int xsend (zmq::msg_t *msg_);
int xrecv (zmq::msg_t *msg_); int xrecv (zmq::msg_t *msg_);
......
...@@ -221,14 +221,14 @@ int zmq::socket_base_t::check_protocol (const std::string &protocol_) ...@@ -221,14 +221,14 @@ int zmq::socket_base_t::check_protocol (const std::string &protocol_)
return 0; return 0;
} }
void zmq::socket_base_t::attach_pipe (pipe_t *pipe_, bool icanhasall_) void zmq::socket_base_t::attach_pipe (pipe_t *pipe_, bool subscribe_to_all_)
{ {
// First, register the pipe so that we can terminate it later on. // First, register the pipe so that we can terminate it later on.
pipe_->set_event_sink (this); pipe_->set_event_sink (this);
pipes.push_back (pipe_); pipes.push_back (pipe_);
// Let the derived socket type know about new pipe. // Let the derived socket type know about new pipe.
xattach_pipe (pipe_, icanhasall_); xattach_pipe (pipe_, subscribe_to_all_);
// If the socket is already being closed, ask any new pipes to terminate // If the socket is already being closed, ask any new pipes to terminate
// straight away. // straight away.
...@@ -556,10 +556,10 @@ int zmq::socket_base_t::connect (const char *addr_) ...@@ -556,10 +556,10 @@ int zmq::socket_base_t::connect (const char *addr_)
// PGM does not support subscription forwarding; ask for all data to be // PGM does not support subscription forwarding; ask for all data to be
// sent to this pipe. // sent to this pipe.
bool icanhasall = protocol == "pgm" || protocol == "epgm"; bool subscribe_to_all = protocol == "pgm" || protocol == "epgm";
pipe_t *newpipe = NULL; pipe_t *newpipe = NULL;
if (options.immediate != 1 || icanhasall) { if (options.immediate != 1 || subscribe_to_all) {
// Create a bi-directional pipe. // Create a bi-directional pipe.
object_t *parents [2] = {this, session}; object_t *parents [2] = {this, session};
pipe_t *new_pipes [2] = {NULL, NULL}; pipe_t *new_pipes [2] = {NULL, NULL};
...@@ -579,7 +579,7 @@ int zmq::socket_base_t::connect (const char *addr_) ...@@ -579,7 +579,7 @@ int zmq::socket_base_t::connect (const char *addr_)
errno_assert (rc == 0); errno_assert (rc == 0);
// Attach local end of the pipe to the socket object. // Attach local end of the pipe to the socket object.
attach_pipe (new_pipes [0], icanhasall); attach_pipe (new_pipes [0], subscribe_to_all);
newpipe = new_pipes [0]; newpipe = new_pipes [0];
// Attach remote end of the pipe to the session object later on. // Attach remote end of the pipe to the session object later on.
......
...@@ -125,7 +125,7 @@ namespace zmq ...@@ -125,7 +125,7 @@ namespace zmq
// Concrete algorithms for the x- methods are to be defined by // Concrete algorithms for the x- methods are to be defined by
// individual socket types. // individual socket types.
virtual void xattach_pipe (zmq::pipe_t *pipe_, virtual void xattach_pipe (zmq::pipe_t *pipe_,
bool icanhasall_ = false) = 0; bool subscribe_to_all_ = false) = 0;
// The default implementation assumes there are no specific socket // The default implementation assumes there are no specific socket
// options for the particular socket type. If not so, overload this // options for the particular socket type. If not so, overload this
...@@ -197,7 +197,7 @@ namespace zmq ...@@ -197,7 +197,7 @@ namespace zmq
int check_protocol (const std::string &protocol_); int check_protocol (const std::string &protocol_);
// Register the pipe with this socket. // Register the pipe with this socket.
void attach_pipe (zmq::pipe_t *pipe_, bool icanhasall_ = false); void attach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_ = false);
// Processes commands sent to this socket (if any). If timeout is -1, // Processes commands sent to this socket (if any). If timeout is -1,
// returns only after at least one command was processed. // returns only after at least one command was processed.
......
...@@ -46,10 +46,10 @@ zmq::stream_t::~stream_t () ...@@ -46,10 +46,10 @@ zmq::stream_t::~stream_t ()
prefetched_msg.close (); prefetched_msg.close ();
} }
void zmq::stream_t::xattach_pipe (pipe_t *pipe_, bool icanhasall_) void zmq::stream_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_)
{ {
// icanhasall_ is unused // subscribe_to_all_ is unused
(void)icanhasall_; (void)subscribe_to_all_;
zmq_assert (pipe_); zmq_assert (pipe_);
......
...@@ -39,7 +39,7 @@ namespace zmq ...@@ -39,7 +39,7 @@ namespace zmq
~stream_t (); ~stream_t ();
// Overloads of functions from socket_base_t. // Overloads of functions from socket_base_t.
void xattach_pipe (zmq::pipe_t *pipe_, bool icanhasall_); void xattach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_);
int xsend (zmq::msg_t *msg_); int xsend (zmq::msg_t *msg_);
int xrecv (zmq::msg_t *msg_); int xrecv (zmq::msg_t *msg_);
bool xhas_in (); bool xhas_in ();
......
...@@ -36,14 +36,14 @@ zmq::xpub_t::~xpub_t () ...@@ -36,14 +36,14 @@ zmq::xpub_t::~xpub_t ()
{ {
} }
void zmq::xpub_t::xattach_pipe (pipe_t *pipe_, bool icanhasall_) void zmq::xpub_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_)
{ {
zmq_assert (pipe_); zmq_assert (pipe_);
dist.attach (pipe_); dist.attach (pipe_);
// If icanhasall_ is specified, the caller would like to subscribe // If subscribe_to_all_ is specified, the caller would like to subscribe
// to all data on this pipe, implicitly. // to all data on this pipe, implicitly.
if (icanhasall_) if (subscribe_to_all_)
subscriptions.add (NULL, 0, pipe_); subscriptions.add (NULL, 0, pipe_);
// The pipe is active when attached. Let's read the subscriptions from // The pipe is active when attached. Let's read the subscriptions from
......
...@@ -46,7 +46,7 @@ namespace zmq ...@@ -46,7 +46,7 @@ namespace zmq
~xpub_t (); ~xpub_t ();
// Implementations of virtual functions from socket_base_t. // Implementations of virtual functions from socket_base_t.
void xattach_pipe (zmq::pipe_t *pipe_, bool icanhasall_ = false); void xattach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_ = false);
int xsend (zmq::msg_t *msg_); int xsend (zmq::msg_t *msg_);
bool xhas_out (); bool xhas_out ();
int xrecv (zmq::msg_t *msg_); int xrecv (zmq::msg_t *msg_);
......
...@@ -43,10 +43,10 @@ zmq::xsub_t::~xsub_t () ...@@ -43,10 +43,10 @@ zmq::xsub_t::~xsub_t ()
errno_assert (rc == 0); errno_assert (rc == 0);
} }
void zmq::xsub_t::xattach_pipe (pipe_t *pipe_, bool icanhasall_) void zmq::xsub_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_)
{ {
// icanhasall_ is unused // subscribe_to_all_ is unused
(void) icanhasall_; (void) subscribe_to_all_;
zmq_assert (pipe_); zmq_assert (pipe_);
fq.attach (pipe_); fq.attach (pipe_);
......
...@@ -44,7 +44,7 @@ namespace zmq ...@@ -44,7 +44,7 @@ namespace zmq
protected: protected:
// Overloads of functions from socket_base_t. // Overloads of functions from socket_base_t.
void xattach_pipe (zmq::pipe_t *pipe_, bool icanhasall_); void xattach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_);
int xsend (zmq::msg_t *msg_); int xsend (zmq::msg_t *msg_);
bool xhas_out (); bool xhas_out ();
int xrecv (zmq::msg_t *msg_); int xrecv (zmq::msg_t *msg_);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment