Skip to content

Commit

Permalink
Merge pull request #10 from Gurpartap/patch-1
Browse files Browse the repository at this point in the history
Use write instead of send
  • Loading branch information
tarcieri committed Aug 15, 2012
2 parents ce32ef7 + 402f1e2 commit 1f9e2b2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/celluloid/zmq/sockets.rb
Expand Up @@ -78,14 +78,15 @@ def read(buffer = '')
# Writable 0MQ sockets have a send method
module WritableSocket
# Send a message to the socket
def send(*messages)
def write(*messages)
unless ::ZMQ::Util.resultcode_ok? @socket.send_strings messages.flatten
raise IOError, "error sending 0MQ message: #{::ZMQ::Util.error_string}"
end

messages
end
alias_method :<<, :send
alias_method :<<, :write
alias_method :send, :write # deprecated
end

# ReqSockets are the counterpart of RepSockets (REQ/REP)
Expand Down

0 comments on commit 1f9e2b2

Please sign in to comment.