litestomp
Functions
stomp_message.c File Reference
#include "stomp_message.h"

Functions

stomp_message_tstomp_message_create (stomp_status_t *status)
 
void stomp_message_destroy (stomp_message_t **message)
 
void stomp_message_format (stomp_message_t *message, const char *data, size_t len)
 

Function Documentation

stomp_message_t* stomp_message_create ( stomp_status_t status)

Creates a new STOMP message object

Parameters
statusA pointer to a status structure that will contain error details in case the message creation fails
Returns
a new STOMP message object
Examples:
messenger/client.c, and messenger/server.c.
void stomp_message_destroy ( stomp_message_t **  message)

Destroy a STOMP message object. The object will be unusable after destruction

Parameters
messageA pointer to a pointer of a message object
Examples:
messenger/client.c, and messenger/server.c.
void stomp_message_format ( stomp_message_t message,
const char *  data,
size_t  len 
)

Writes data to the message object

Parameters
messagethe message object instance to write to
datathe data to write
lenthe lenght of the data
Examples:
messenger/client.c.