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
-
#write(*messages) ⇒ Object
(also: #<<, #send)
Send a message to the socket.
Instance Method Details
#write(*messages) ⇒ Object 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(*) unless ::ZMQ::Util.resultcode_ok? @socket.send_strings .flatten raise IOError, "error sending 0MQ message: #{::ZMQ::Util.error_string}" end end |