Cantil 1.0.0
Scalable publish-subscribe implementation.
Loading...
Searching...
No Matches
Data Fields
CnLoadVt 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 )(CnLoad *, va_list)
 Constructor callback for the message.
 
void(* dtor )(CnLoad *)
 Destructor callback for the message.
 

Detailed Description

Vtable for message construction.

Field Documentation

◆ ctor

void(* CnLoadVt::ctor)(CnLoad *, 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 CnLoad pointer.

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

◆ dtor

void(* CnLoadVt::dtor)(CnLoad *)

Destructor callback for the message.

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

◆ size

size_t(* CnLoadVt::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 cn_broker_create().

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