0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-27 15:41:05 +08:00

perf tests modified to reflect change in subscription format

This commit is contained in:
Martin Sustrik 2010-01-05 14:45:10 +01:00
parent 8d339e9596
commit ef049efe2e
7 changed files with 11 additions and 9 deletions

View File

@ -51,7 +51,7 @@ int main (int argc, char *argv [])
s = zmq_socket (ctx, ZMQ_SUB);
assert (s);
rc = zmq_setsockopt (s, ZMQ_SUBSCRIBE , "*", 1);
rc = zmq_setsockopt (s, ZMQ_SUBSCRIBE , "", 0);
assert (rc == 0);
// Add your socket options here.

View File

@ -30,7 +30,7 @@
(zmq::with-context (ctx 1 1)
(zmq:with-socket (s ctx zmq:sub)
(zmq:setsockopt s zmq:subscribe "*")
(zmq:setsockopt s zmq:subscribe "")
(zmq:setsockopt s zmq:rate *rate*)
(zmq:bind s *bind-address*)
(let ((msg (make-instance 'zmq:msg)))

View File

@ -38,7 +38,7 @@ int main (int argc, char *argv [])
zmq::socket_t s (ctx, ZMQ_SUB);
s.setsockopt (ZMQ_SUBSCRIBE , "*", 1);
s.setsockopt (ZMQ_SUBSCRIBE , "", 0);
// Add your socket options here.
// For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM.

View File

@ -37,7 +37,7 @@ class local_thr
org.zmq.Socket s = new org.zmq.Socket (ctx, org.zmq.Socket.SUB);
s.setsockopt (org.zmq.Socket.SUBSCRIBE , "*");
s.setsockopt (org.zmq.Socket.SUBSCRIBE , "");
// Add your socket options here.
// For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM.

View File

@ -37,7 +37,7 @@ def main ():
ctx = libpyzmq.Context (1, 1);
s = libpyzmq.Socket (ctx, libpyzmq.SUB)
s.setsockopt (libpyzmq.SUBSCRIBE , "*");
s.setsockopt (libpyzmq.SUBSCRIBE , "");
# Add your socket options here.
# For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM.

View File

@ -29,7 +29,7 @@ message_count = ARGV[2].to_i
ctx = Context.new(1, 1, 0)
s = Socket.new(ctx, SUB);
s.setsockopt(SUBSCRIBE, "*");
s.setsockopt(SUBSCRIBE, "");
# Add your socket options here.
# For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM.

View File

@ -102,9 +102,11 @@ void zmq::zmq_engine_t::in_event ()
// Stop polling for input if we got stuck.
if (processed < insize) {
zmq_assert (false);
// TODO: This may happen is queue limits are implemented.
// reset_pollin (handle);
// This may happen if queue limits are implemented or when
// init object reads all required information from the socket
// and rejects to read more data.
reset_pollin (handle);
}
// Flush all messages the decoder may have produced.