zmq 2.0.7.1 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/rbzmq.c +27 -6
- metadata +3 -7
data/rbzmq.c
CHANGED
@@ -558,7 +558,10 @@ static VALUE context_socket (VALUE self_, VALUE type_)
|
|
558
558
|
*
|
559
559
|
* == ZMQ::DOWNSTREAM
|
560
560
|
*
|
561
|
-
* A socket of type ZMQ::DOWNSTREAM is used by a pipeline node to send messages
|
561
|
+
* A socket of type ZMQ::DOWNSTREAM is used by a pipeline node to send messages
|
562
|
+
* to downstream pipeline nodes. Messages are load-balanced to all connected
|
563
|
+
* downstream nodes. The ZMQ::recv() function is not implemented for this socket
|
564
|
+
* type.
|
562
565
|
*
|
563
566
|
* When a ZMQ::DOWNSTREAM socket enters an exceptional state due to having
|
564
567
|
* reached the high water mark for all downstream _nodes_, or if there are no
|
@@ -605,7 +608,8 @@ static VALUE context_socket (VALUE self_, VALUE type_)
|
|
605
608
|
* send() operations on the socket shall block until the peer becomes
|
606
609
|
* available for sending; messages are not discarded.
|
607
610
|
*
|
608
|
-
* *NOTE* ZMQ_PAIR sockets are experimental, and are currently missing several
|
611
|
+
* *NOTE* ZMQ_PAIR sockets are experimental, and are currently missing several
|
612
|
+
* features such as auto-reconnection.
|
609
613
|
*
|
610
614
|
* === Summary of ZMQ::PAIR characteristics
|
611
615
|
* [Compatible peer sockets] ZMQ::PAIR
|
@@ -1158,8 +1162,12 @@ static VALUE zmq_send_blocking (void* args_)
|
|
1158
1162
|
* _socket_. The _flags_ argument is a combination of the flags defined
|
1159
1163
|
* below:
|
1160
1164
|
*
|
1161
|
-
* [ZMQ::NOBLOCK] Specifies that the operation should be performed in
|
1162
|
-
*
|
1165
|
+
* [ZMQ::NOBLOCK] Specifies that the operation should be performed in
|
1166
|
+
* non-blocking mode. If the message cannot be queued on the _socket_,
|
1167
|
+
* the function shall fail and return _false_.
|
1168
|
+
* [ZMQ::SNDMORE] Specifies that the message being sent is a multi-part message,
|
1169
|
+
* and that further message parts are to follow. Refer to the section regarding
|
1170
|
+
* multi-part messages below for a detailed description.
|
1163
1171
|
*
|
1164
1172
|
* <b>NOTE:</b> A successful invocation of send() does not indicate that the
|
1165
1173
|
* message has been transmitted to the network, only that it has been queued on
|
@@ -1253,7 +1261,9 @@ static VALUE zmq_recv_blocking (void* args_)
|
|
1253
1261
|
* satisfied. The _flags_ argument is a combination of the flags defined
|
1254
1262
|
* below:
|
1255
1263
|
*
|
1256
|
-
* [ZMQ::NOBLOCK] Specifies that the operation should be performed in
|
1264
|
+
* [ZMQ::NOBLOCK] Specifies that the operation should be performed in
|
1265
|
+
* non-blocking mode. If there are no messages available on the _socket_,
|
1266
|
+
* the recv() function shall fail and return _nil_.
|
1257
1267
|
*
|
1258
1268
|
* == Multi-part messages
|
1259
1269
|
* A 0MQ message is composed of 1 or more message parts. 0MQ ensures atomic
|
@@ -1291,7 +1301,8 @@ static VALUE socket_recv (int argc_, VALUE* argv_, VALUE self_)
|
|
1291
1301
|
recv_args.socket = s;
|
1292
1302
|
recv_args.msg = &msg;
|
1293
1303
|
recv_args.flags = flags;
|
1294
|
-
rb_thread_blocking_region (zmq_recv_blocking, (void*) &recv_args,
|
1304
|
+
rb_thread_blocking_region (zmq_recv_blocking, (void*) &recv_args,
|
1305
|
+
NULL, NULL);
|
1295
1306
|
rc = recv_args.rc;
|
1296
1307
|
}
|
1297
1308
|
else
|
@@ -1390,6 +1401,16 @@ void Init_zmq ()
|
|
1390
1401
|
rb_define_const (zmq_module, "REP", INT2NUM (ZMQ_REP));
|
1391
1402
|
rb_define_const (zmq_module, "XREQ", INT2NUM (ZMQ_XREQ));
|
1392
1403
|
rb_define_const (zmq_module, "XREP", INT2NUM (ZMQ_XREP));
|
1404
|
+
|
1405
|
+
#ifdef ZMQ_PUSH
|
1406
|
+
rb_define_const (zmq_module, "PUSH", INT2NUM (ZMQ_PUSH));
|
1407
|
+
rb_define_const (zmq_module, "PULL", INT2NUM (ZMQ_PULL));
|
1408
|
+
#else
|
1409
|
+
rb_define_const (zmq_module, "PUSH", INT2NUM (ZMQ_DOWNSTREAM));
|
1410
|
+
rb_define_const (zmq_module, "PULL", INT2NUM (ZMQ_UPSTREAM));
|
1411
|
+
#endif
|
1412
|
+
|
1413
|
+
// Obsolete.
|
1393
1414
|
rb_define_const (zmq_module, "UPSTREAM", INT2NUM (ZMQ_UPSTREAM));
|
1394
1415
|
rb_define_const (zmq_module, "DOWNSTREAM", INT2NUM (ZMQ_DOWNSTREAM));
|
1395
1416
|
}
|
metadata
CHANGED
@@ -1,14 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zmq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 113
|
5
4
|
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 2
|
8
7
|
- 0
|
9
|
-
-
|
10
|
-
|
11
|
-
version: 2.0.7.1
|
8
|
+
- 9
|
9
|
+
version: 2.0.9
|
12
10
|
platform: ruby
|
13
11
|
authors:
|
14
12
|
- Martin Sustrik
|
@@ -17,7 +15,7 @@ autorequire:
|
|
17
15
|
bindir: bin
|
18
16
|
cert_chain: []
|
19
17
|
|
20
|
-
date: 2010-
|
18
|
+
date: 2010-09-21 00:00:00 -07:00
|
21
19
|
default_executable:
|
22
20
|
dependencies: []
|
23
21
|
|
@@ -49,7 +47,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
49
47
|
requirements:
|
50
48
|
- - ">="
|
51
49
|
- !ruby/object:Gem::Version
|
52
|
-
hash: 3
|
53
50
|
segments:
|
54
51
|
- 0
|
55
52
|
version: "0"
|
@@ -58,7 +55,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
58
55
|
requirements:
|
59
56
|
- - ">="
|
60
57
|
- !ruby/object:Gem::Version
|
61
|
-
hash: 3
|
62
58
|
segments:
|
63
59
|
- 0
|
64
60
|
version: "0"
|