Module: Celluloid::ZMQ::WritableSocket

Included in:
DealerSocket, PubSocket, PushSocket, RepSocket, ReqSocket, RouterSocket, XPubSocket
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



112
113
114
115
116
117
118
# File 'lib/celluloid/zmq/sockets.rb', line 112

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