Class: Wamp::Worker::Proxy::Requestor
- Defined in:
- lib/wamp/worker/proxy/requestor.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#call(procedure, args = nil, kwargs = nil, options = {}, &callback) ⇒ Object
Performs the session “call” method.
-
#publish(topic, args = nil, kwargs = nil, options = {}, &callback) ⇒ Object
Performs the session “publish” method.
Methods inherited from Base
#background_res_queue, #command_req_queue, #initialize, #unique_command_resp_queue
Constructor Details
This class inherits a constructor from Wamp::Worker::Proxy::Base
Instance Method Details
#call(procedure, args = nil, kwargs = nil, options = {}, &callback) ⇒ Object
Performs the session “call” method
15 16 17 18 19 20 21 22 |
# File 'lib/wamp/worker/proxy/requestor.rb', line 15 def call(procedure, args=nil, kwargs=nil, ={}, &callback) # Create the params params = { procedure: procedure, args: args, kwargs: kwargs, options: } # Execute the command request_response :call, params, true, &callback end |
#publish(topic, args = nil, kwargs = nil, options = {}, &callback) ⇒ Object
Performs the session “publish” method
30 31 32 33 34 35 36 37 |
# File 'lib/wamp/worker/proxy/requestor.rb', line 30 def publish(topic, args=nil, kwargs=nil, ={}, &callback) # Create the params params = { topic: topic , args: args, kwargs: kwargs, options: } # Execute the command request_response :publish, params, [:acknowledge], &callback end |