Class: EventMachine::ZMQ::Context
- Inherits:
-
ZMQ::Context
- Object
- ZMQ::Context
- EventMachine::ZMQ::Context
- Defined in:
- lib/eventmachine/zmq/context.rb
Constant Summary collapse
- READ =
[:sub, :req, :rep, :xreq, :xrep, :pull]
- WRITE =
[:pub, :req, :rep, :xreq, :xrep, :push]
Instance Method Summary collapse
- #bind(type, address, handler = nil, *args, &blk) ⇒ Object
- #connect(type, address, handler = nil, *args, &blk) ⇒ Object
Instance Method Details
#bind(type, address, handler = nil, *args, &blk) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/eventmachine/zmq/context.rb', line 8 def bind type, address, handler=nil, *args, &blk sock = socket type_const_from_args(type) [*address].each {|addr| sock.bind addr} create(sock, handler, *args, &blk) end |
#connect(type, address, handler = nil, *args, &blk) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/eventmachine/zmq/context.rb', line 15 def connect type, address, handler=nil, *args, &blk sock = socket type_const_from_args(type) [*address].each {|addr| sock.connect addr} create(sock, handler, *args, &blk) end |