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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aaef58251b0eb71a09de2e6614a728051abc6c01
4
- data.tar.gz: 7b77162ec56a6df2f7c0211d5473e2b1b437206f
3
+ metadata.gz: 86300669439c93ba578f5881c11424212c0bf4c3
4
+ data.tar.gz: b1fcf73bc95b550ba24a31526bbb73ebbcbf904b
5
5
  SHA512:
6
- metadata.gz: b87258245ef93fd6d2d90391f42422aaea73dcae7712e24d06fb8042fe8b019fffa0db24c98d3335e59617c649cc2eaae3a913cd9c741d271f858cc8b09c0334
7
- data.tar.gz: 6ee10101e4de2928aeb5804bb1a407537bf36fa0443446494d3786a3ee817adbfff716f512829f51cf5b489b520d77fd26a00984ece6f5bf573d3aa8ab510f56
6
+ metadata.gz: 79d942c1e43d2d400c3df06bcc7b63f8016b36d736f936216b564dc6e66b9086c29483ebd474630776722004ac032aeea32d617f7e2c1025170dadd3f272de0d
7
+ data.tar.gz: 7747c57e3458664a3801aa55d09abbf61de1e0904316cb6b069eb29206bc4ce874a6853ce92c21a33cd295631fccd0119dc97ad141aab144467c60c7c4606226
data/lib/ffi-rzmq-core.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  require 'ffi'
2
2
  require 'ffi-rzmq-core/libc'
3
3
  require 'ffi-rzmq-core/libzmq'
4
- require 'ffi-rzmq-core/structures'
5
4
  require 'ffi-rzmq-core/utilities'
5
+ require 'ffi-rzmq-core/structures'
6
6
  require 'ffi-rzmq-core/constants'
7
7
 
8
8
  if LibZMQ.version4?
@@ -37,54 +37,72 @@ module ZMQ
37
37
  }
38
38
 
39
39
  # Socket options
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
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
@@ -1,3 +1,3 @@
1
1
  module LibZMQ
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
@@ -2,13 +2,23 @@ require 'spec_helper'
2
2
 
3
3
  describe LibZMQ do
4
4
 
5
- it "wraps the msg_t struct as Message" do
6
- message = LibZMQ::Message.new
5
+ if LibZMQ.version4? && LibZMQ.version[:minor] > 0
7
6
 
8
- expect(message[:content]).to_not be_nil
9
- expect(message[:flags]).to_not be_nil
10
- expect(message[:vsm_size]).to_not be_nil
11
- expect(message[:vsm_data]).to_not be_nil
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.3
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: 2014-03-12 00:00:00.000000000 Z
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.2.0
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.