Module: Celluloid::ZMQ::WritableSocket

Included in:
DealerSocket, PubSocket, PushSocket, RepSocket, ReqSocket, RouterSocket
Defined in:
lib/celluloid/zmq/sockets.rb

Overview

Writable 0MQ sockets have a send method

Instance Method Summary (collapse)

Instance Method Details

- (Object) write(*messages) Also known as: <<, send

Send a message to the socket



101
102
103
104
105
106
107
# File 'lib/celluloid/zmq/sockets.rb', line 101

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