From 61ad236e9543a569fe066872a5fda4fa40ea7591 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sat, 13 Mar 2010 14:40:10 +0100 Subject: ZMQ_NOFLUSH and zmq_flush obsoleted --- src/pub.cpp | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'src/pub.cpp') diff --git a/src/pub.cpp b/src/pub.cpp index 2971e5c..ad78834 100644 --- a/src/pub.cpp +++ b/src/pub.cpp @@ -107,8 +107,7 @@ int zmq::pub_t::xsend (zmq_msg_t *msg_, int flags_) for (out_pipes_t::size_type i = 0; i != pipes_count; i++) { bool written = out_pipes [i]->write (msg_); zmq_assert (written); - if (!(flags_ & ZMQ_NOFLUSH)) - out_pipes [i]->flush (); + out_pipes [i]->flush (); } int rc = zmq_msg_init (msg_); zmq_assert (rc == 0); @@ -121,8 +120,7 @@ int zmq::pub_t::xsend (zmq_msg_t *msg_, int flags_) if (pipes_count == 1) { bool written = out_pipes [0]->write (msg_); zmq_assert (written); - if (!(flags_ & ZMQ_NOFLUSH)) - out_pipes [0]->flush (); + out_pipes [0]->flush (); int rc = zmq_msg_init (msg_); zmq_assert (rc == 0); return 0; @@ -142,8 +140,7 @@ int zmq::pub_t::xsend (zmq_msg_t *msg_, int flags_) for (out_pipes_t::size_type i = 0; i != pipes_count; i++) { bool written = out_pipes [i]->write (msg_); zmq_assert (written); - if (!(flags_ & ZMQ_NOFLUSH)) - out_pipes [i]->flush (); + out_pipes [i]->flush (); } // Detach the original message from the data buffer. @@ -153,14 +150,6 @@ int zmq::pub_t::xsend (zmq_msg_t *msg_, int flags_) return 0; } -int zmq::pub_t::xflush () -{ - out_pipes_t::size_type pipe_count = out_pipes.size (); - for (out_pipes_t::size_type i = 0; i != pipe_count; i++) - out_pipes [i]->flush (); - return 0; -} - int zmq::pub_t::xrecv (zmq_msg_t *msg_, int flags_) { errno = ENOTSUP; -- cgit v1.2.3