ffi-rzmq-core 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ffi-rzmq-core.rb +1 -1
- data/lib/ffi-rzmq-core/constants.rb +66 -48
- data/lib/ffi-rzmq-core/structures.rb +9 -0
- data/lib/ffi-rzmq-core/version.rb +1 -1
- data/spec/structures_spec.rb +16 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86300669439c93ba578f5881c11424212c0bf4c3
|
4
|
+
data.tar.gz: b1fcf73bc95b550ba24a31526bbb73ebbcbf904b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79d942c1e43d2d400c3df06bcc7b63f8016b36d736f936216b564dc6e66b9086c29483ebd474630776722004ac032aeea32d617f7e2c1025170dadd3f272de0d
|
7
|
+
data.tar.gz: 7747c57e3458664a3801aa55d09abbf61de1e0904316cb6b069eb29206bc4ce874a6853ce92c21a33cd295631fccd0119dc97ad141aab144467c60c7c4606226
|
data/lib/ffi-rzmq-core.rb
CHANGED
@@ -37,54 +37,72 @@ module ZMQ
|
|
37
37
|
}
|
38
38
|
|
39
39
|
# Socket options
|
40
|
-
AFFINITY
|
41
|
-
IDENTITY
|
42
|
-
SUBSCRIBE
|
43
|
-
UNSUBSCRIBE
|
44
|
-
RATE
|
45
|
-
RECOVERY_IVL
|
46
|
-
SNDBUF
|
47
|
-
RCVBUF
|
48
|
-
RCVMORE
|
49
|
-
FD
|
50
|
-
EVENTS
|
51
|
-
TYPE
|
52
|
-
LINGER
|
53
|
-
RECONNECT_IVL
|
54
|
-
BACKLOG
|
55
|
-
RECONNECT_IVL_MAX
|
56
|
-
MAXMSGSIZE
|
57
|
-
SNDHWM
|
58
|
-
RCVHWM
|
59
|
-
MULTICAST_HOPS
|
60
|
-
RCVTIMEO
|
61
|
-
SNDTIMEO
|
62
|
-
IPV4ONLY
|
63
|
-
LAST_ENDPOINT
|
64
|
-
ROUTER_MANDATORY
|
65
|
-
TCP_KEEPALIVE
|
66
|
-
TCP_KEEPALIVE_CNT
|
67
|
-
TCP_KEEPALIVE_IDLE
|
68
|
-
TCP_KEEPALIVE_INTVL
|
69
|
-
TCP_ACCEPT_FILTER
|
70
|
-
DELAY_ATTACH_ON_CONNECT
|
71
|
-
XPUB_VERBOSE
|
72
|
-
ROUTER_RAW
|
73
|
-
IPV6
|
74
|
-
MECHANISM
|
75
|
-
PLAIN_SERVER
|
76
|
-
PLAIN_USERNAME
|
77
|
-
PLAIN_PASSWORD
|
78
|
-
CURVE_SERVER
|
79
|
-
CURVE_PUBLICKEY
|
80
|
-
CURVE_SECRETKEY
|
81
|
-
CURVE_SERVERKEY
|
82
|
-
PROBE_ROUTER
|
83
|
-
REQ_CORRELATE
|
84
|
-
REQ_RELAXED
|
85
|
-
CONFLATE
|
86
|
-
ZAP_DOMAIN
|
87
|
-
ROUTER_HANDOVER
|
40
|
+
AFFINITY = 4
|
41
|
+
IDENTITY = 5
|
42
|
+
SUBSCRIBE = 6
|
43
|
+
UNSUBSCRIBE = 7
|
44
|
+
RATE = 8
|
45
|
+
RECOVERY_IVL = 9
|
46
|
+
SNDBUF = 11
|
47
|
+
RCVBUF = 12
|
48
|
+
RCVMORE = 13
|
49
|
+
FD = 14
|
50
|
+
EVENTS = 15
|
51
|
+
TYPE = 16
|
52
|
+
LINGER = 17
|
53
|
+
RECONNECT_IVL = 18
|
54
|
+
BACKLOG = 19
|
55
|
+
RECONNECT_IVL_MAX = 21
|
56
|
+
MAXMSGSIZE = 22
|
57
|
+
SNDHWM = 23
|
58
|
+
RCVHWM = 24
|
59
|
+
MULTICAST_HOPS = 25
|
60
|
+
RCVTIMEO = 27
|
61
|
+
SNDTIMEO = 28
|
62
|
+
IPV4ONLY = 31
|
63
|
+
LAST_ENDPOINT = 32
|
64
|
+
ROUTER_MANDATORY = 33
|
65
|
+
TCP_KEEPALIVE = 34
|
66
|
+
TCP_KEEPALIVE_CNT = 35
|
67
|
+
TCP_KEEPALIVE_IDLE = 36
|
68
|
+
TCP_KEEPALIVE_INTVL = 37
|
69
|
+
TCP_ACCEPT_FILTER = 38
|
70
|
+
DELAY_ATTACH_ON_CONNECT = 39
|
71
|
+
XPUB_VERBOSE = 40
|
72
|
+
ROUTER_RAW = 41
|
73
|
+
IPV6 = 42
|
74
|
+
MECHANISM = 43
|
75
|
+
PLAIN_SERVER = 44
|
76
|
+
PLAIN_USERNAME = 45
|
77
|
+
PLAIN_PASSWORD = 46
|
78
|
+
CURVE_SERVER = 47
|
79
|
+
CURVE_PUBLICKEY = 48
|
80
|
+
CURVE_SECRETKEY = 49
|
81
|
+
CURVE_SERVERKEY = 50
|
82
|
+
PROBE_ROUTER = 51
|
83
|
+
REQ_CORRELATE = 52
|
84
|
+
REQ_RELAXED = 53
|
85
|
+
CONFLATE = 54
|
86
|
+
ZAP_DOMAIN = 55
|
87
|
+
ROUTER_HANDOVER = 56
|
88
|
+
TOS = 57
|
89
|
+
CONNECT_RID = 61
|
90
|
+
GSSAPI_SERVER = 62
|
91
|
+
GSSAPI_PRINCIPAL = 63
|
92
|
+
GSSAPI_SERVICE_PRINCIPAL = 64
|
93
|
+
GSSAPI_PLAINTEXT = 65
|
94
|
+
HANDSHAKE_IVL = 66
|
95
|
+
SOCKS_PROXY = 68
|
96
|
+
XPUB_NODROP = 69
|
97
|
+
BLOCKY = 70
|
98
|
+
XPUB_MANUAL = 71
|
99
|
+
XPUB_WELCOME_MSG = 72
|
100
|
+
STREAM_NOTIFY = 73
|
101
|
+
INVERT_MATCHING = 74
|
102
|
+
HEARTBEAT_IVL = 75
|
103
|
+
HEARTBEAT_TTL = 76
|
104
|
+
HEARTBEAT_TIMEOUT = 77
|
105
|
+
XPUB_VERBOSE_UNSUBSCRIBE = 78
|
88
106
|
|
89
107
|
IMMEDIATE = DELAY_ATTACH_ON_CONNECT
|
90
108
|
FAIL_UNROUTABLE = ROUTER_MANDATORY
|
@@ -8,6 +8,15 @@ module LibZMQ
|
|
8
8
|
:vsm_size, :uint8,
|
9
9
|
:vsm_data, [:uint8, 30]
|
10
10
|
end
|
11
|
+
|
12
|
+
if LibZMQ.version[:major] >= 4 && LibZMQ.version[:minor] > 0
|
13
|
+
|
14
|
+
# zmq_msg_t was expanded to 64 bytes as of version 4.1.0
|
15
|
+
class Message < FFI::Struct
|
16
|
+
layout :content, :ulong_long
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
11
20
|
|
12
21
|
|
13
22
|
# Create the basic mapping for the poll_item_t structure so we can
|
data/spec/structures_spec.rb
CHANGED
@@ -2,13 +2,23 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe LibZMQ do
|
4
4
|
|
5
|
-
|
6
|
-
message = LibZMQ::Message.new
|
5
|
+
if LibZMQ.version4? && LibZMQ.version[:minor] > 0
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
it "the msg_t struct wrapped in Message is 64 bytes" do
|
8
|
+
LibZMQ::Message.size == 64
|
9
|
+
end
|
10
|
+
|
11
|
+
else
|
12
|
+
|
13
|
+
it "wraps the msg_t struct as Message" do
|
14
|
+
message = LibZMQ::Message.new
|
15
|
+
|
16
|
+
expect(message[:content]).to_not be_nil
|
17
|
+
expect(message[:flags]).to_not be_nil
|
18
|
+
expect(message[:vsm_size]).to_not be_nil
|
19
|
+
expect(message[:vsm_data]).to_not be_nil
|
20
|
+
end
|
21
|
+
|
12
22
|
end
|
13
23
|
|
14
24
|
it "wraps poll_item_t in a PollItem" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffi-rzmq-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chuck Remes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
version: '0'
|
103
103
|
requirements: []
|
104
104
|
rubyforge_project:
|
105
|
-
rubygems_version: 2.
|
105
|
+
rubygems_version: 2.4.5.1
|
106
106
|
signing_key:
|
107
107
|
specification_version: 4
|
108
108
|
summary: This gem provides only the FFI wrapper for the ZeroMQ (0mq) networking library.
|