Class: Miu::SubSocket
- Includes:
- ReadableSocket
- Defined in:
- lib/miu/sockets.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Socket
Instance Method Summary collapse
Methods included from ReadableSocket
Methods inherited from Socket
#bind, build_address, #close, #connect, inherited, #initialize, socket_type, #socket_type, #to_io
Constructor Details
This class inherits a constructor from Miu::Socket
Instance Method Details
#subscribe(topic) ⇒ Object
114 115 116 |
# File 'lib/miu/sockets.rb', line 114 def subscribe(topic) error_wrapper { @socket.setsockopt(::ZMQ::SUBSCRIBE, topic) } end |
#unsubscribe(topic) ⇒ Object
118 119 120 |
# File 'lib/miu/sockets.rb', line 118 def unsubscribe(topic) error_wrapper { @socket.setsockopt(::ZMQ::UNSUBSCRIBE, topic) } end |