diff --git a/lib/celluloid/zmq/sockets.rb b/lib/celluloid/zmq/sockets.rb index 3dd3683..59f9e4c 100644 --- a/lib/celluloid/zmq/sockets.rb +++ b/lib/celluloid/zmq/sockets.rb @@ -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)