GNUnet 0.21.1
mst.c File Reference

convenience functions for handling inbound message buffers More...

#include "platform.h"
#include "gnunet_util_lib.h"
Include dependency graph for mst.c:

Go to the source code of this file.

Data Structures

struct  GNUNET_MessageStreamTokenizer
 Handle to a message stream tokenizer. More...
 

Macros

#define ALIGN_FACTOR   8
 
#define LOG(kind, ...)   GNUNET_log_from (kind, "util-mst", __VA_ARGS__)
 

Functions

struct GNUNET_MessageStreamTokenizerGNUNET_MST_create (GNUNET_MessageTokenizerCallback cb, void *cb_cls)
 Create a message stream tokenizer. More...
 
enum GNUNET_GenericReturnValue GNUNET_MST_from_buffer (struct GNUNET_MessageStreamTokenizer *mst, const char *buf, size_t size, int purge, int one_shot)
 Add incoming data to the receive buffer and call the callback for all complete messages. More...
 
enum GNUNET_GenericReturnValue GNUNET_MST_read (struct GNUNET_MessageStreamTokenizer *mst, struct GNUNET_NETWORK_Handle *sock, int purge, int one_shot)
 Add incoming data to the receive buffer and call the callback for all complete messages. More...
 
enum GNUNET_GenericReturnValue GNUNET_MST_next (struct GNUNET_MessageStreamTokenizer *mst, int one_shot)
 Obtain the next message from the mst, assuming that there are more unprocessed messages in the internal buffer of the mst. More...
 
void GNUNET_MST_destroy (struct GNUNET_MessageStreamTokenizer *mst)
 Destroys a tokenizer. More...
 

Detailed Description

convenience functions for handling inbound message buffers

Author
Christian Grothoff

Definition in file mst.c.

Macro Definition Documentation

◆ ALIGN_FACTOR

#define ALIGN_FACTOR   8

Definition at line 35 of file mst.c.

◆ LOG

#define LOG (   kind,
  ... 
)    GNUNET_log_from (kind, "util-mst", __VA_ARGS__)

Definition at line 38 of file mst.c.