simple thread
Public Member Functions | Static Public Member Functions | List of all members
st::reply Struct Reference

object capable of sending a st::message back to an st::channel More...

#include <reply.hpp>

Inheritance diagram for st::reply:
st::shared_context< reply, detail::reply::context >

Public Member Functions

template<typename T >
bool send (T &&t)
 send an st::message back to the st::channel More...
 

Static Public Member Functions

template<typename CHANNEL >
static reply make (CHANNEL &&ch, std::size_t id=0)
 construct a reply More...
 

Detailed Description

object capable of sending a st::message back to an st::channel

This object provides a simple, lightweight way to send messages back to a requestor while abstracting the message passing details.

For example, his object can be the payload st::data of an st::message, allowing a user to forward information back to a requestor.

Member Function Documentation

◆ make()

template<typename CHANNEL >
static reply st::reply::make ( CHANNEL &&  ch,
std::size_t  id = 0 
)
inlinestatic

construct a reply

Parameters
chan st::channel to send st::message back to
idunsigned int id of st::message sent back over ch

◆ send()

template<typename T >
bool st::reply::send ( T &&  t)
inline

send an st::message back to the st::channel

Parameters
tst::message payload data
Returns
true if internal st::channel::send(...) succeeds, else false

The documentation for this struct was generated from the following file: