puzzlebox
Loading...
Searching...
No Matches
pb-msg.h
1#pragma once
2
3#include "pb-buf.h"
4#include "pb-types.h"
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
33pb_buf_t pb_msg_write(const pb_msg_t * msg);
46pb_msg_t * pb_msg_read(const pb_buf_t * buf);
53void pb_msg_free(pb_msg_t * msg);
54
56
57#ifdef __cplusplus
58}
59#endif
pb_msg_t * pb_msg_read(const pb_buf_t *buf)
Read a binary buffer and attempt to deserialize it as a puzzle bus message.
Definition pb-msg.c:27
pb_buf_t pb_msg_write(const pb_msg_t *msg)
Serialize a message into a binary buffer.
Definition pb-msg.c:9
void pb_msg_free(pb_msg_t *msg)
Recursively free fields of a pb_msg_t.
Definition pb-msg.c:39
binary buffer struct
Definition pb-buf.h:18
puzzle bus message header / container (shared by all commands)
Definition pb-types.h:94