Class: ZMQ::DefaultHandler

Inherits:
Handler
  • Object
show all
Defined in:
lib/zmq/default_handler.rb

Instance Attribute Summary

Attributes inherited from Handler

#pollitem

Instance Method Summary collapse

Methods inherited from Handler

#initialize, #on_error, #recv, #send

Constructor Details

This class inherits a constructor from ZMQ::Handler

Instance Method Details

#on_readableObject

A default / blanket pollitem callback handler for when a socket or IO is registered on a ZMQ::Loop instance.

XXX: Likely a massive fail for some socket / IO pairs as a default - look into removing this.



9
10
11
# File 'lib/zmq/default_handler.rb', line 9

def on_readable
  p recv
end

#on_writableObject



13
14
15
# File 'lib/zmq/default_handler.rb', line 13

def on_writable
  send("")
end