zeromqrb 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/zero_mq.rb +1 -0
- data/lib/zero_mq/device.rb +36 -0
- data/lib/zero_mq/errors.rb +1 -0
- data/lib/zero_mq/version.rb +1 -1
- data/zeromqrb.gemspec +1 -1
- metadata +26 -33
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 50fa7fca66034efa14ccf2e10aeed7539600879a
|
4
|
+
data.tar.gz: 9adeece237a8d18bf79b2dd362a3f60565e7414b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0b38ff052f04d90035e3e550f396408fdb8c65b96b0bab14bf7e8c410e589057c60721c0db42a9cd5be913fe68cb8c84d99d02566373b54c41d555436f49990e
|
7
|
+
data.tar.gz: e14118b5b8e78be8e9ae4e54e62cb4f0a20f1573491bdec16aab790920b6bc9f0ba269626b3c9a3453f0e3a69c7fcdf829714a7265adc21b02b42e64519a99f7
|
data/lib/zero_mq.rb
CHANGED
@@ -0,0 +1,36 @@
|
|
1
|
+
module ZeroMQ
|
2
|
+
class Device
|
3
|
+
|
4
|
+
def self.create(frontend, backend, capture=nil)
|
5
|
+
new(frontend, backend, capture)
|
6
|
+
end
|
7
|
+
|
8
|
+
# Starts the built-in ØMQ proxy in the current application thread.
|
9
|
+
#
|
10
|
+
# The proxy connects a frontend socket to a backend socket. Conceptually,
|
11
|
+
# data flows from frontend to backend. Depending on the socket types,
|
12
|
+
# replies may flow in the opposite direction. The direction is conceptual
|
13
|
+
# only; the proxy is fully symmetric and there is no technical difference
|
14
|
+
# between frontend and backend.
|
15
|
+
#
|
16
|
+
# Before calling zmq_proxy() you must set any socket options, and connect
|
17
|
+
# or bind both frontend and backend sockets.
|
18
|
+
#
|
19
|
+
# If the capture socket is not NULL, the proxy shall send all messages,
|
20
|
+
# received on both frontend and backend, to the capture socket. The capture
|
21
|
+
# socket should be a ZMQ_PUB, ZMQ_DEALER, ZMQ_PUSH, or ZMQ_PAIR socket.
|
22
|
+
#
|
23
|
+
# http://api.zeromq.org/3-2:zmq-proxy
|
24
|
+
def initialize(frontend, backend, capture=nil)
|
25
|
+
# If objects are of class ZeroMQ::Socket, pull out the ZMQ::Socket
|
26
|
+
# object to be passed to ZMQ::Device.
|
27
|
+
args = [frontend, backend, capture]
|
28
|
+
.map! { |socket| (socket.is_a? ZeroMQ::Socket) ? socket.__getobj__ : socket }
|
29
|
+
|
30
|
+
ZMQ::Device.new *args
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# Alias for device.
|
35
|
+
class Proxy < Device; end
|
36
|
+
end
|
data/lib/zero_mq/errors.rb
CHANGED
data/lib/zero_mq/version.rb
CHANGED
data/zeromqrb.gemspec
CHANGED
metadata
CHANGED
@@ -1,64 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zeromqrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Bulat Shakirzyanov
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-
|
11
|
+
date: 2014-10-16 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
|
-
|
16
|
-
|
17
|
-
none: false
|
14
|
+
prerelease: false
|
15
|
+
version_requirements: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '1.3'
|
22
20
|
type: :development
|
23
|
-
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
21
|
+
requirement: !ruby/object:Gem::Requirement
|
26
22
|
requirements:
|
27
23
|
- - ~>
|
28
24
|
- !ruby/object:Gem::Version
|
29
25
|
version: '1.3'
|
26
|
+
name: bundler
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
|
-
|
32
|
-
|
33
|
-
none: false
|
28
|
+
prerelease: false
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :development
|
39
|
-
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
42
36
|
requirements:
|
43
|
-
- -
|
37
|
+
- - '>='
|
44
38
|
- !ruby/object:Gem::Version
|
45
39
|
version: '0'
|
40
|
+
name: rake
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
|
-
|
48
|
-
|
49
|
-
none: false
|
42
|
+
prerelease: false
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
47
|
+
version: '0'
|
54
48
|
type: :runtime
|
55
|
-
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
58
50
|
requirements:
|
59
|
-
- -
|
51
|
+
- - '>='
|
60
52
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
53
|
+
version: '0'
|
54
|
+
name: ffi-rzmq
|
62
55
|
description: High level wrapper for ffi-rzmq gem
|
63
56
|
email:
|
64
57
|
- bulat@twilio.com
|
@@ -73,6 +66,7 @@ files:
|
|
73
66
|
- Rakefile
|
74
67
|
- lib/zero_mq.rb
|
75
68
|
- lib/zero_mq/context.rb
|
69
|
+
- lib/zero_mq/device.rb
|
76
70
|
- lib/zero_mq/errors.rb
|
77
71
|
- lib/zero_mq/poller.rb
|
78
72
|
- lib/zero_mq/socket.rb
|
@@ -82,27 +76,26 @@ files:
|
|
82
76
|
homepage: ''
|
83
77
|
licenses:
|
84
78
|
- MIT
|
79
|
+
metadata: {}
|
85
80
|
post_install_message:
|
86
81
|
rdoc_options: []
|
87
82
|
require_paths:
|
88
83
|
- lib
|
89
84
|
required_ruby_version: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
85
|
requirements:
|
92
|
-
- -
|
86
|
+
- - '>='
|
93
87
|
- !ruby/object:Gem::Version
|
94
88
|
version: '0'
|
95
89
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
|
-
none: false
|
97
90
|
requirements:
|
98
|
-
- -
|
91
|
+
- - '>='
|
99
92
|
- !ruby/object:Gem::Version
|
100
93
|
version: '0'
|
101
94
|
requirements: []
|
102
95
|
rubyforge_project:
|
103
|
-
rubygems_version:
|
96
|
+
rubygems_version: 2.4.1
|
104
97
|
signing_key:
|
105
|
-
specification_version:
|
98
|
+
specification_version: 4
|
106
99
|
summary: High level wrapper for ffi-rzmq gem
|
107
100
|
test_files: []
|
108
101
|
has_rdoc:
|