Publishing events

Publishing events is done from a session using one of the following functions. More...

Classes

class  autobahn::wamp_publish_options
 Options for publishing. More...
 

Functions

boost::future< void > autobahn::wamp_session::publish (const std::string &topic, const wamp_publish_options &options=wamp_publish_options())
 Publish an event with empty payload to a topic. More...
 
template<typename List >
boost::future< void > autobahn::wamp_session::publish (const std::string &topic, const List &arguments, const wamp_publish_options &options=wamp_publish_options())
 Publish an event with positional payload to a topic. More...
 
template<typename List , typename Map >
boost::future< void > autobahn::wamp_session::publish (const std::string &topic, const List &arguments, const Map &kw_arguments, const wamp_publish_options &options=wamp_publish_options())
 Publish an event with both positional and keyword payload to a topic. More...
 

Detailed Description

Publishing events is done from a session using one of the following functions.

When a WAMP session has been established, the session can be used to publish event at the router, which in turn will dispatch the event to all eligible and authorized subscribes to the topic.

Function Documentation

boost::future<void> autobahn::wamp_session::publish ( const std::string &  topic,
const wamp_publish_options options = wamp_publish_options() 
)

Publish an event with empty payload to a topic.

Parameters
topicThe URI of the topic to publish to.
Returns
A future that resolves once the the topic has been published to.
template<typename List >
boost::future<void> autobahn::wamp_session::publish ( const std::string &  topic,
const List &  arguments,
const wamp_publish_options options = wamp_publish_options() 
)

Publish an event with positional payload to a topic.

Parameters
topicThe URI of the topic to publish to.
argumentsThe positional payload for the event.
Returns
A future that resolves once the the topic has been published to.
template<typename List , typename Map >
boost::future<void> autobahn::wamp_session::publish ( const std::string &  topic,
const List &  arguments,
const Map &  kw_arguments,
const wamp_publish_options options = wamp_publish_options() 
)

Publish an event with both positional and keyword payload to a topic.

Parameters
topicThe URI of the topic to publish to.
argumentsThe positional payload for the event.
kw_argumentsThe keyword payload for the event.
Returns
A future that resolves once the the topic has been published to.