Class: ZMQ::Proxy
- Inherits:
-
Object
- Object
- ZMQ::Proxy
- Defined in:
- lib/0mq/proxy.rb
Instance Method Summary collapse
-
#initialize(frontend, backend, capture = nil) ⇒ Proxy
constructor
A new instance of Proxy.
-
#run ⇒ Object
Block the current thread with the event loop of the proxy.
Constructor Details
#initialize(frontend, backend, capture = nil) ⇒ Proxy
Returns a new instance of Proxy.
6 7 8 9 10 |
# File 'lib/0mq/proxy.rb', line 6 def initialize(frontend, backend, capture = nil) @frontend = frontend.nil? ? nil : frontend.ptr @backend = backend.nil? ? nil : backend.ptr @capture = capture.nil? ? nil : capture.ptr end |
Instance Method Details
#run ⇒ Object
Block the current thread with the event loop of the proxy
13 14 15 |
# File 'lib/0mq/proxy.rb', line 13 def run LibZMQ.zmq_proxy @frontend, @backend, @capture end |