em-zeromq 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +0 -6
- data/em-zeromq.gemspec +1 -1
- data/lib/em-zeromq/connection.rb +12 -13
- data/lib/em-zeromq/version.rb +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -2,8 +2,6 @@
|
|
2
2
|
|
3
3
|
Low level event machine support for ZeroMQ
|
4
4
|
|
5
|
-
FOR NOW BUILD EVENTMACHINE FROM HEAD OR YOU WILL FIND A PAINFUL BUG
|
6
|
-
|
7
5
|
## Description: ##
|
8
6
|
|
9
7
|
This seems to work fine, no memory leaks, and it runs fast.
|
@@ -14,10 +12,6 @@ to make ZeroMQ work with EventMachine.
|
|
14
12
|
|
15
13
|
You must use either rubinius, jruby, or 1.9.x. 1.8.7 does not work with libzmq.
|
16
14
|
|
17
|
-
If you use 1.9.x, be sure to install the ffi gem first.
|
18
|
-
|
19
|
-
For all rubies install ffi-rzmq and eventmachine as well.
|
20
|
-
|
21
15
|
This only works with ZeroMQ 2.1.x which is still unreleased
|
22
16
|
Build+Install ZeroMQ 2.1 from HEAD ( https://github.com/zeromq/zeromq2 )
|
23
17
|
|
data/em-zeromq.gemspec
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
|
|
15
15
|
|
16
16
|
s.rubyforge_project = "em-zeromq"
|
17
17
|
|
18
|
-
s.add_dependency 'eventmachine', '>= 0.
|
18
|
+
s.add_dependency 'eventmachine', '>= 1.0.0.beta.3'
|
19
19
|
s.add_dependency 'ffi-rzmq', '>= 0.7.2'
|
20
20
|
|
21
21
|
s.add_development_dependency 'rspec', '>= 2.5.0'
|
data/lib/em-zeromq/connection.rb
CHANGED
@@ -103,18 +103,6 @@ module EventMachine
|
|
103
103
|
self.notify_writable = true
|
104
104
|
end
|
105
105
|
|
106
|
-
private
|
107
|
-
# internal methods
|
108
|
-
def readable?
|
109
|
-
(@socket.getsockopt(ZMQ::EVENTS) & ZMQ::POLLIN) == ZMQ::POLLIN
|
110
|
-
end
|
111
|
-
|
112
|
-
def writable?
|
113
|
-
return true
|
114
|
-
# ZMQ::EVENTS has issues in ZMQ HEAD, we'll ignore this till they're fixed
|
115
|
-
# (@socket.getsockopt(ZMQ::EVENTS) & ZMQ::POLLOUT) == ZMQ::POLLOUT
|
116
|
-
end
|
117
|
-
|
118
106
|
def notify_readable
|
119
107
|
# Not sure if this is actually necessary. I suppose it prevents us
|
120
108
|
# from having to to instantiate a ZMQ::Message unnecessarily.
|
@@ -155,7 +143,18 @@ module EventMachine
|
|
155
143
|
@handler.on_writable(self)
|
156
144
|
end
|
157
145
|
end
|
158
|
-
|
146
|
+
private
|
147
|
+
# internal methods
|
148
|
+
def readable?
|
149
|
+
(@socket.getsockopt(ZMQ::EVENTS) & ZMQ::POLLIN) == ZMQ::POLLIN
|
150
|
+
end
|
151
|
+
|
152
|
+
def writable?
|
153
|
+
return true
|
154
|
+
# ZMQ::EVENTS has issues in ZMQ HEAD, we'll ignore this till they're fixed
|
155
|
+
# (@socket.getsockopt(ZMQ::EVENTS) & ZMQ::POLLOUT) == ZMQ::POLLOUT
|
156
|
+
end
|
157
|
+
|
159
158
|
def get_message
|
160
159
|
msg = ZMQ::Message.new
|
161
160
|
msg_recvd = @socket.recv(msg, ZMQ::NOBLOCK)
|
data/lib/em-zeromq/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: em-zeromq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.2.
|
5
|
+
version: 0.2.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Andrew Cholakian
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-03-
|
13
|
+
date: 2011-03-03 00:00:00 -08:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
requirements:
|
22
22
|
- - ">="
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version: 0.
|
24
|
+
version: 1.0.0.beta.3
|
25
25
|
type: :runtime
|
26
26
|
version_requirements: *id001
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
98
|
requirements: []
|
99
99
|
|
100
100
|
rubyforge_project: em-zeromq
|
101
|
-
rubygems_version: 1.
|
101
|
+
rubygems_version: 1.6.0
|
102
102
|
signing_key:
|
103
103
|
specification_version: 3
|
104
104
|
summary: Low level event machine support for ZeroMQ
|