Sturk 1.1.0
Publish-subscribe C implementation.
Loading...
Searching...
No Matches
StMessageVt Struct Reference

Vtable for message construction. More...

#include <broker.h>

Data Fields

size_t(* size_cb )(void)
 Callback for obtaining the size of the message.
 
void(* ctor )(void *, va_list)
 Constructor callback for the message.
 
void(* dtor )(void *)
 Destructor callback for the message.
 

Detailed Description

Vtable for message construction.

Field Documentation

◆ ctor

void(* StMessageVt::ctor)(void *, va_list)

Constructor callback for the message.

Should allocate additional memory for the message, if needed (see "dynamic context") and initialize the message - read arguments from the va_list and fill the message passed through the void pointer.

Note
The input va_list will hold all values passed to st_publish() after the StChannel argument.
See also
st_publish()

◆ dtor

void(* StMessageVt::dtor)(void *)

Destructor callback for the message.

Should free all the memory allocated by the StMessageVt::ctor.

◆ size_cb

size_t(* StMessageVt::size_cb)(void) ( void  )

Callback for obtaining the size of the message.

Should return the size of the message in bytes.


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