Class: Bundesstrasse::QueueDevice
- Defined in:
- lib/bundesstrasse/devices.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Attributes inherited from Device
Class Method Summary collapse
Instance Method Summary collapse
- #create_endpoint!(options = {}) ⇒ Object
-
#initialize(context, frontend, backend) ⇒ QueueDevice
constructor
A new instance of QueueDevice.
Methods inherited from Device
Methods included from Errors
#errno, #error_check, #error_string
Constructor Details
#initialize(context, frontend, backend) ⇒ QueueDevice
Returns a new instance of QueueDevice.
4 5 6 7 |
# File 'lib/bundesstrasse/devices.rb', line 4 def initialize(context, frontend, backend) super(ZMQ::QUEUE, frontend, backend) @context = context end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
3 4 5 |
# File 'lib/bundesstrasse/devices.rb', line 3 def context @context end |
Class Method Details
.create(context) ⇒ Object
13 14 15 16 17 |
# File 'lib/bundesstrasse/devices.rb', line 13 def self.create(context) frontend = context.socket(ZMQ::ROUTER) backend = context.socket(ZMQ::DEALER) new(context, frontend, backend) end |
Instance Method Details
#create_endpoint!(options = {}) ⇒ Object
9 10 11 |
# File 'lib/bundesstrasse/devices.rb', line 9 def create_endpoint!(={}) @context.socket(ZMQ::REP, ) end |