lib/wamp/client/session.rb
# Publishes and event to a topic
#
# @param topic [String] The topic to publish the event to
# @param args [Array] The arguments
# @param kwargs [Hash] The keyword arguments
# @param options [Hash] The options for the publish
# @param callback [block] The callback(publish, error, details) called to signal if the publish was a success or not
Publishes and event to a topic
Publishes and event to a topic
def publish(topic, args=nil, kwargs=nil, options={}, &callback)
        check_open
        self.class.check_uri('topic', topic)
        self.class.check_dict('options', options)
        self.class.check_list('args', args, true)
        self.class.check_dict('kwargs', kwargs, true)
        make_request(:publish, :request, topic, args, kwargs, options, &callback)
      end
def publish ( topic , args = nil , kwargs = nil , options = { } , & callback ) check_open self . class . check_uri ( 'topic' , topic ) self . class . check_dict ( 'options' , options ) self . class . check_list ( 'args' , args , true ) self . class . check_dict ( 'kwargs' , kwargs , true ) make_request ( :publish , :request , topic , args , kwargs , options , & callback ) end
Publishes and event to a topic
Publishes and event to a topic
# Check params # Make the request
topic
The topic to publish the event to
The topic to publish the event to
args
None
kwargs
The keyword arguments
The keyword arguments
options
The options for the publish
The options for the publish
callback
The callback(publish, error, details) called to signal if the publish was a success or not
The callback ( publish error details ) called to signal if the publish was a success or not