module CZTop::SendReceiveMethods
These are methods that can be used on a {Socket} as well as an {Actor}, but actually just pass through to methods of {Message} (which take a polymorphic reference, in Ruby as well as in C). @see api.zeromq.org/czmq3-0:zmsg
Public Instance Methods
<<(message)
click to toggle source
Sends a message.
@param message [Message, String, Array<parts>] the message to send @raise [IO::EAGAINWaitWritable] if send timeout has been reached (see
{ZsockOptions::OptionsAccessor#sndtimeo=})
@raise [Interrupt, ArgumentError, SystemCallError] anything raised by
{Message#send_to}
@return [self] @see Message.coerce
@see Message#send_to
# File lib/cztop/send_receive_methods.rb, line 18 def <<(message) Message.coerce(message).send_to(self) self end
receive()
click to toggle source
Receives a message.
@return [Message] @raise [IO::EAGAINWaitReadable] if receive timeout has been reached (see
{ZsockOptions::OptionsAccessor#rcvtimeo=})
@raise [Interrupt, ArgumentError, SystemCallError] anything raised by
{Message.receive_from}
@see Message.receive_from
# File lib/cztop/send_receive_methods.rb, line 31 def receive Message.receive_from(self) end