Class: DripDrop::ZMQPubHandler

Inherits:
ZMQBaseHandler show all
Includes:
ZMQWritableHandler
Defined in:
lib/dripdrop/handlers/zeromq.rb

Instance Attribute Summary

Attributes inherited from ZMQBaseHandler

#connection

Instance Method Summary collapse

Methods included from ZMQWritableHandler

#initialize, #on_writable

Methods inherited from ZMQBaseHandler

#add_connection, #address, #initialize, #on_receive, #on_recv, #post_setup, #read_connection, #write_connection

Methods inherited from BaseHandler

#handle_error, #on_error, #print_exception

Instance Method Details

#send_message(message) ⇒ Object

Sends a message along



160
161
162
163
164
165
166
167
# File 'lib/dripdrop/handlers/zeromq.rb', line 160

def send_message(message)
  dd_message = dd_messagify(message,@message_class)
  if dd_message.is_a?(DripDrop::Message)
    super([dd_message.name, dd_message.encoded])
  else
    super(message)
  end
end