Class: NNQ::SUB0
Overview
SUB side of the pub/sub pattern (nng sub0). Applies local byte-prefix filtering. Empty subscription set means no messages are delivered — matching nng (unlike pre-4.x ZeroMQ). Defaults to dialing.
Instance Attribute Summary
Attributes inherited from Socket
Instance Method Summary collapse
- #receive ⇒ String?
-
#subscribe(prefix) ⇒ Object
Subscribes to
prefix. -
#unsubscribe(prefix) ⇒ Object
Removes a previously-added subscription.
Methods inherited from Socket
#all_peers_gone, bind, #bind, #close, #close_read, connect, #connect, #connection_count, #frozen_binary, #initialize, #last_endpoint, #monitor, #peer_connected, #raw?, #reconnect_enabled, #reconnect_enabled=
Constructor Details
This class inherits a constructor from NNQ::Socket
Instance Method Details
#receive ⇒ String?
58 59 60 |
# File 'lib/nnq/pub_sub.rb', line 58 def receive Reactor.run { @engine.routing.receive } end |