Class: OMQ::DISH
- Inherits:
-
Socket
- Object
- Socket
- OMQ::DISH
- Includes:
- Readable
- Defined in:
- lib/omq/radio_dish.rb
Overview
Group-based subscriber socket (ZeroMQ RFC 48).
Receives messages from RADIO peers for joined groups. Supports both TCP and UDP transports.
Instance Method Summary collapse
-
#initialize(endpoints = nil, linger: Float::INFINITY, group: nil, on_mute: :block, backend: nil) ⇒ DISH
constructor
Creates a new DISH socket.
-
#join(group) ⇒ void
Joins a group.
-
#leave(group) ⇒ void
Leaves a group.
Constructor Details
#initialize(endpoints = nil, linger: Float::INFINITY, group: nil, on_mute: :block, backend: nil) ⇒ DISH
Creates a new DISH socket.
78 79 80 81 82 83 |
# File 'lib/omq/radio_dish.rb', line 78 def initialize(endpoints = nil, linger: Float::INFINITY, group: nil, on_mute: :block, backend: nil) init_engine(:DISH, on_mute: on_mute, backend: backend) @options.linger = linger attach_endpoints(endpoints, default: :connect) join(group) if group end |
Instance Method Details
#join(group) ⇒ void
This method returns an undefined value.
Joins a group.
91 92 93 |
# File 'lib/omq/radio_dish.rb', line 91 def join(group) @engine.routing.join(group) end |
#leave(group) ⇒ void
This method returns an undefined value.
Leaves a group.
101 102 103 |
# File 'lib/omq/radio_dish.rb', line 101 def leave(group) @engine.routing.leave(group) end |