0mq 0.1.1 → 0.1.2
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.
- checksums.yaml +4 -4
- data/lib/0mq/context.rb +16 -0
- data/lib/0mq/socket.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 473c613f99809b02a04f9dd571c4346fb4a21dc6
|
4
|
+
data.tar.gz: 7715e9eccbb78b63574c49bbb8dde74b399be0b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2634ad6efa95f1fefb126a3d73f846905ea31d3e7796839d35d74146622666b5cbe1e48869dafca39e4cfbf673af839d6a32511ddf8dc056b6241b22a8896fe
|
7
|
+
data.tar.gz: ecc8934f09fcacaaecbc1a4d9a6eb51673495bd1fba521972c0a4b9f0938246d32bba54f91a0ee068f90bd924d7cf4d56c718e7d1e8d9f2d2ab156394f65c076
|
data/lib/0mq/context.rb
CHANGED
@@ -8,6 +8,22 @@ module ZMQ
|
|
8
8
|
@ptr = LibZMQ.zmq_ctx_new
|
9
9
|
end
|
10
10
|
|
11
|
+
# Destroy the ØMQ context.
|
12
|
+
def terminate
|
13
|
+
if @ptr
|
14
|
+
rc = LibZMQ.zmq_ctx_term @ptr
|
15
|
+
ZMQ.error_check true if rc == -1
|
16
|
+
|
17
|
+
@ptr = nil
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
# Create a Socket within this context.
|
22
|
+
def socket(type, opts={})
|
23
|
+
opts[:context] = self
|
24
|
+
ZMQ::Socket.new type, opts
|
25
|
+
end
|
26
|
+
|
11
27
|
end
|
12
28
|
|
13
29
|
DefaultContext = Context.new
|
data/lib/0mq/socket.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: 0mq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe McIlvain
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-03-
|
12
|
+
date: 2014-03-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi-rzmq-core
|