Libchirp

#ifndef ch_libchirp_h
#define ch_libchirp_h

#include "libchirp/chirp.h"
#include "libchirp/encryption.h"
#include "libchirp/message.h"
extern char* ch_version

Version of chirp.

CH_EXPORT
extern char* ch_version;
CH_EXPORT ch_error_t ch_libchirp_cleanup(void)

Cleanup the global libchirp structures, including encryption/libssl

In release-mode we do not cleanup the TLS library. If you want to check for memory leaks in your application define CH_TLS_CLEANUP or call ch_en_tls_cleanup() manually.

CH_EXPORT ch_error_t ch_libchirp_init(void)

Initialize the global libchirp structures, including encryption/libssl

CH_EXPORT void ch_set_alloc_funcs(ch_alloc_cb_t alloc, ch_realloc_cb_t realloc, ch_free_cb_t free)

Set allocation functions.

Note

The user can change the functions multiple times. The user has to ensure consistency of allocation/free pairs.

Parameters:
  • alloc (ch_alloc_cb_t) – Memory allocation callback. Has the same signature as malloc
  • realloc (ch_realloc_cb_t) – Memory reallocation callback. Has the same signature as realloc
  • free (ch_free_cb_t) – Callback to free memory. Has the same signature as free
#endif // ch_libchirp_h