Skip to content

Commit

Permalink
Merge a17ddc0 into 110861d
Browse files Browse the repository at this point in the history
  • Loading branch information
Asmod4n committed Apr 16, 2014
2 parents 110861d + a17ddc0 commit 1c8939f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Expand Up @@ -3,17 +3,17 @@ before_install: sudo apt-get install libzmq3-dev
rvm:
- 1.9.3
- 2.0.0
- 2.1.1
- ruby-head
- jruby-19mode
- jruby
- jruby-head
- rbx-19mode
- rbx-2

matrix:
allow_failures:
- rvm: jruby-19mode
- rvm: rbx-19mode
- rvm: ruby-head
- rvm: jruby-head
- rvm: rbx-2

notifications:
irc: "irc.freenode.org#celluloid"
7 changes: 4 additions & 3 deletions Gemfile
@@ -1,7 +1,8 @@
source 'http://rubygems.org'
source 'https://rubygems.org'

# Specify your gem's dependencies in celluloid-zmq.gemspec
gemspec

gem 'coveralls', require: false
gem 'celluloid', github: 'celluloid/celluloid', branch: 'master'

# Specify your gem's dependencies in celluloid-zmq.gemspec
gemspec
10 changes: 10 additions & 0 deletions lib/celluloid/zmq/sockets.rb
Expand Up @@ -90,6 +90,16 @@ def read(buffer = '')
end
buffer
end

# Read a multipart string message from the socket
def read_multipart(buffer = [])
ZMQ.wait_readable(@socket) if ZMQ.evented?

unless ::ZMQ::Util.resultcode_ok? @socket.recv_strings buffer
raise IOError, "error receiving ZMQ string: #{::ZMQ::Util.error_string}"
end
buffer
end

# Multiparts message ?
def_delegator :@socket, :more_parts?
Expand Down

0 comments on commit 1c8939f

Please sign in to comment.