zmq 2.1.0.1 → 2.1.3
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 +80 -1
- metadata +22 -38
data/rbzmq.c
CHANGED
@@ -744,6 +744,22 @@ static VALUE context_socket (VALUE self_, VALUE type_)
|
|
744
744
|
* [Default value] 10
|
745
745
|
* [Applicable socket types] all, when using multicast transports
|
746
746
|
*
|
747
|
+
* == ZMQ::RECOVERY_IVL_MSEC: Get multicast recovery interval in milliseconds
|
748
|
+
* The ZMQ::RECOVERY_IVL_MSEC option shall retrieve the recovery interval, in
|
749
|
+
* milliseconds (ms) for multicast transports using the specified socket. The
|
750
|
+
* recovery interval determines the maximum time in milliseconds that a receiver
|
751
|
+
* can be absent from a multicast group before unrecoverable data loss will occur.
|
752
|
+
*
|
753
|
+
* For backward compatibility, the default value of ZMQ::RECOVERY_IVL_MSEC is -1
|
754
|
+
* indicating that the recovery interval should be obtained from the
|
755
|
+
* ZMQ::RECOVERY_IVL option. However, if the ZMQ::RECOVERY_IVL_MSEC value is not
|
756
|
+
* zero, then it will take precedence, and be used.
|
757
|
+
*
|
758
|
+
* [Option value type] Integer
|
759
|
+
* [Option value unit] milliseconds
|
760
|
+
* [Default value] -1
|
761
|
+
* [Applicable socket types] all, when using multicast transports
|
762
|
+
*
|
747
763
|
* == ZMQ::MCAST_LOOP: Control multicast loopback
|
748
764
|
* The ZMQ::MCAST_LOOP option controls whether data sent via multicast transports
|
749
765
|
* can also be received by the sending host via loopback. A value of zero
|
@@ -819,6 +835,22 @@ static VALUE context_socket (VALUE self_, VALUE type_)
|
|
819
835
|
* [Default value] 100
|
820
836
|
* [Applicable socket types] all, only for connection-oriented transports
|
821
837
|
*
|
838
|
+
* == ZMQ::RECONNECT_IVL_MAX: Retrieve maximum reconnection interval
|
839
|
+
* The ZMQ::RECONNECT_IVL_MAX option shall set the maximum reconnection interval
|
840
|
+
* for the specified socket. This is the maximum period ØMQ shall wait between
|
841
|
+
* attempts to reconnect. On each reconnect attempt, the previous interval
|
842
|
+
* shall be doubled untill ZMQ::RECONNECT_IVL_MAX is reached. This allows for
|
843
|
+
* exponential backoff strategy. Default value means no exponential backoff
|
844
|
+
* is performed and reconnect interval calculations are only based on
|
845
|
+
* ZMQ::RECONNECT_IVL.
|
846
|
+
*
|
847
|
+
* Values less than ZMQ::RECONNECT_IVL will be ignored.
|
848
|
+
*
|
849
|
+
* [Option value type] Integer
|
850
|
+
* [Option value unit] milliseconds
|
851
|
+
* [Default value] 0 (only use RECONNECT_IVL)
|
852
|
+
* [Applicable socket types] all, only for connection-oriented transports
|
853
|
+
*
|
822
854
|
* == ZMQ::BACKLOG: Retrieve maximum length of the queue of outstanding connections
|
823
855
|
* The ZMQ::BACKLOG option shall retrieve the maximum length of the queue of
|
824
856
|
* outstanding peer connections for the specified socket; this only applies to
|
@@ -934,6 +966,10 @@ static VALUE socket_getsockopt (VALUE self_, VALUE option_)
|
|
934
966
|
case ZMQ_LINGER:
|
935
967
|
case ZMQ_RECONNECT_IVL:
|
936
968
|
case ZMQ_BACKLOG:
|
969
|
+
#if ZMQ_VERSION >= 20101
|
970
|
+
case ZMQ_RECONNECT_IVL_MAX:
|
971
|
+
case ZMQ_RECOVERY_IVL_MSEC:
|
972
|
+
#endif
|
937
973
|
{
|
938
974
|
int optval;
|
939
975
|
size_t optvalsize = sizeof(optval);
|
@@ -1129,13 +1165,35 @@ static VALUE socket_getsockopt (VALUE self_, VALUE option_)
|
|
1129
1165
|
* maximum time in seconds that a receiver can be absent from a multicast group
|
1130
1166
|
* before unrecoverable data loss will occur.
|
1131
1167
|
*
|
1132
|
-
* <
|
1168
|
+
* <bCaution:</b> Exercise care when setting large recovery intervals as the data
|
1169
|
+
* needed for recovery will be held in memory. For example, a 1 minute recovery
|
1170
|
+
* interval at a data rate of 1Gbps requires a 7GB in-memory buffer.
|
1133
1171
|
*
|
1134
1172
|
* [Option value type] Integer
|
1135
1173
|
* [Option value unit] seconds
|
1136
1174
|
* [Default value] 10
|
1137
1175
|
* [Applicable socket types] all, when using multicast transports
|
1138
1176
|
*
|
1177
|
+
* == ZMQ::RECOVERY_IVL_MSEC: Set multicast recovery interval in milliseconds
|
1178
|
+
* The ZMQ::RECOVERY_IVL_MSEC option shall set the recovery interval, specified
|
1179
|
+
* in milliseconds (ms) for multicast transports using the specified socket. The
|
1180
|
+
* recovery interval determines the maximum time in milliseconds that a receiver
|
1181
|
+
* can be absent from a multicast group before unrecoverable data loss will occur.
|
1182
|
+
*
|
1183
|
+
* A non-zero value of the ZMQ::RECOVERY_IVL_MSEC option will take precedence over
|
1184
|
+
* the ZMQ::RECOVERY_IVL option, but since the default for the
|
1185
|
+
* ZMQ::RECOVERY_IVL_MSEC is -1, the default is to use the ZMQ::RECOVERY_IVL option
|
1186
|
+
* value.
|
1187
|
+
*
|
1188
|
+
* <bCaution:</b> Exercise care when setting large recovery intervals as the data
|
1189
|
+
* needed for recovery will be held in memory. For example, a 1 minute recovery
|
1190
|
+
* interval at a data rate of 1Gbps requires a 7GB in-memory buffer.
|
1191
|
+
*
|
1192
|
+
* [Option value type] Integer
|
1193
|
+
* [Option value unit] milliseconds
|
1194
|
+
* [Default value] -1
|
1195
|
+
* [Applicable socket types] all, when using multicast transports
|
1196
|
+
*
|
1139
1197
|
* == ZMQ::MCAST_LOOP: Control multicast loopback
|
1140
1198
|
* The ZMQ::MCAST_LOOP option shall control whether data sent via multicast
|
1141
1199
|
* transports using the specified _socket_ can also be received by the sending
|
@@ -1255,6 +1313,10 @@ static VALUE socket_setsockopt (VALUE self_, VALUE option_,
|
|
1255
1313
|
case ZMQ_LINGER:
|
1256
1314
|
case ZMQ_RECONNECT_IVL:
|
1257
1315
|
case ZMQ_BACKLOG:
|
1316
|
+
#if ZMQ_VERSION >= 20101
|
1317
|
+
case ZMQ_RECONNECT_IVL_MAX:
|
1318
|
+
case ZMQ_RECOVERY_IVL_MSEC:
|
1319
|
+
#endif
|
1258
1320
|
{
|
1259
1321
|
int optval = FIX2LONG (optval_);
|
1260
1322
|
|
@@ -1632,6 +1694,10 @@ void Init_zmq ()
|
|
1632
1694
|
rb_define_const (zmq_module, "RECONNECT_IVL", INT2NUM (ZMQ_RECONNECT_IVL));
|
1633
1695
|
rb_define_const (zmq_module, "BACKLOG", INT2NUM (ZMQ_BACKLOG));
|
1634
1696
|
#endif
|
1697
|
+
#if ZMQ_VERSION >= 20101
|
1698
|
+
rb_define_const (zmq_module, "RECONNECT_IVL_MAX", INT2NUM (ZMQ_RECONNECT_IVL_MAX));
|
1699
|
+
rb_define_const (zmq_module, "RECOVERY_IVL_MSEC", INT2NUM (ZMQ_RECOVERY_IVL_MSEC));
|
1700
|
+
#endif
|
1635
1701
|
|
1636
1702
|
rb_define_const (zmq_module, "NOBLOCK", INT2NUM (ZMQ_NOBLOCK));
|
1637
1703
|
|
@@ -1640,8 +1706,21 @@ void Init_zmq ()
|
|
1640
1706
|
rb_define_const (zmq_module, "PUB", INT2NUM (ZMQ_PUB));
|
1641
1707
|
rb_define_const (zmq_module, "REQ", INT2NUM (ZMQ_REQ));
|
1642
1708
|
rb_define_const (zmq_module, "REP", INT2NUM (ZMQ_REP));
|
1709
|
+
#ifdef ZMQ_DEALER
|
1710
|
+
rb_define_const (zmq_module, "XREQ", INT2NUM (ZMQ_DEALER));
|
1711
|
+
rb_define_const (zmq_module, "XREP", INT2NUM (ZMQ_ROUTER));
|
1712
|
+
|
1713
|
+
// Deprecated
|
1714
|
+
rb_define_const (zmq_module, "DEALER", INT2NUM (ZMQ_DEALER));
|
1715
|
+
rb_define_const (zmq_module, "ROUTER", INT2NUM (ZMQ_ROUTER));
|
1716
|
+
#else
|
1717
|
+
rb_define_const (zmq_module, "DEALER", INT2NUM (ZMQ_XREQ));
|
1718
|
+
rb_define_const (zmq_module, "ROUTER", INT2NUM (ZMQ_XREP));
|
1719
|
+
|
1720
|
+
// Deprecated
|
1643
1721
|
rb_define_const (zmq_module, "XREQ", INT2NUM (ZMQ_XREQ));
|
1644
1722
|
rb_define_const (zmq_module, "XREP", INT2NUM (ZMQ_XREP));
|
1723
|
+
#endif
|
1645
1724
|
|
1646
1725
|
#ifdef ZMQ_PUSH
|
1647
1726
|
rb_define_const (zmq_module, "PUSH", INT2NUM (ZMQ_PUSH));
|
metadata
CHANGED
@@ -1,70 +1,54 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: zmq
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 2
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
- 1
|
10
|
-
version: 2.1.0.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.1.3
|
5
|
+
prerelease:
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Martin Sustrik
|
14
9
|
- Brian Buchanan
|
15
10
|
autorequire:
|
16
11
|
bindir: bin
|
17
12
|
cert_chain: []
|
18
|
-
|
19
|
-
date: 2010-12-15 00:00:00 -08:00
|
13
|
+
date: 2011-06-05 00:00:00.000000000 -07:00
|
20
14
|
default_executable:
|
21
15
|
dependencies: []
|
22
|
-
|
23
16
|
description: This gem provides a Ruby API for the ZeroMQ messaging library.
|
24
|
-
email:
|
17
|
+
email:
|
25
18
|
- sustrik@250bpm.com
|
26
19
|
- bwb@holo.org
|
27
20
|
executables: []
|
28
|
-
|
29
|
-
extensions:
|
21
|
+
extensions:
|
30
22
|
- extconf.rb
|
31
|
-
extra_rdoc_files:
|
23
|
+
extra_rdoc_files:
|
32
24
|
- rbzmq.c
|
33
|
-
files:
|
25
|
+
files:
|
34
26
|
- Makefile
|
35
27
|
- rbzmq.c
|
36
28
|
- extconf.rb
|
37
29
|
has_rdoc: true
|
38
30
|
homepage: http://www.zeromq.org/bindings:ruby
|
39
31
|
licenses: []
|
40
|
-
|
41
32
|
post_install_message:
|
42
33
|
rdoc_options: []
|
43
|
-
|
44
|
-
require_paths:
|
34
|
+
require_paths:
|
45
35
|
- lib
|
46
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
36
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
47
37
|
none: false
|
48
|
-
requirements:
|
49
|
-
- -
|
50
|
-
- !ruby/object:Gem::Version
|
51
|
-
|
52
|
-
|
53
|
-
version: "0"
|
54
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ! '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
43
|
none: false
|
56
|
-
requirements:
|
57
|
-
- -
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
|
60
|
-
- 0
|
61
|
-
version: "0"
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
62
48
|
requirements: []
|
63
|
-
|
64
49
|
rubyforge_project:
|
65
|
-
rubygems_version: 1.
|
50
|
+
rubygems_version: 1.6.2
|
66
51
|
signing_key:
|
67
52
|
specification_version: 3
|
68
53
|
summary: Ruby API for ZeroMQ
|
69
54
|
test_files: []
|
70
|
-
|