Sturk 1.0.2
Publish-subscribe C implementation.
Loading...
Searching...
No Matches
StLoadVt Struct Reference

Vtable for message construction. More...

#include <broker.h>

Data Fields

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

Detailed Description

Vtable for message construction.

Field Documentation

◆ ctor

void(* StLoadVt::ctor)(StLoad *, va_list)

Constructor callback for the message.

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

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

◆ dtor

void(* StLoadVt::dtor)(StLoad *)

Destructor callback for the message.

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

◆ size

size_t(* StLoadVt::size)(void) ( void  )

Callback for obtaining the size of the load.

Should return the size of the load in bytes.

Note
It is called only once - when creating the broker with st_broker_create().

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