Macros | Enumerations | Functions
MyQtt Init: init, core and common functions

Macros

#define MYQTT_CHECK_REF(ref, return_value)
 Allows to check the reference provided, and returning the return value provided. More...
 
#define MYQTT_CHECK_REF2(ref, return_value, ref2, free2_func)
 Allows to check the reference provided, returning the return value provided, also releasing a second reference with a custom free function. More...
 
#define MYQTT_MAX_MSG_SIZE   (268435455)
 MQTT maximum message size.
 

Enumerations

enum  MyQttConfItem { MYQTT_SOFT_SOCK_LIMIT = 1, MYQTT_HARD_SOCK_LIMIT = 2, MYQTT_LISTENER_BACKLOG = 3, MYQTT_SKIP_THREAD_POOL_WAIT = 6 }
 Allowed items to use for myqtt_conf_get. More...
 

Functions

void myqtt_color_log_enable (MyQttCtx *ctx, axl_bool status)
 Enable console color log. More...
 
axl_bool myqtt_color_log_is_enabled (MyQttCtx *ctx)
 Allows to check if the color log is currently enabled. More...
 
axl_bool myqtt_conf_get (MyQttCtx *ctx, MyQttConfItem item, int *value)
 Allows to get a myqtt configuration, providing a valid myqtt item. More...
 
axl_bool myqtt_conf_set (MyQttCtx *ctx, MyQttConfItem item, int value, const char *str_value)
 Allows to configure the provided item, with either the integer or the string value, according to the item configuration documentation. More...
 
void myqtt_exit_ctx (MyQttCtx *ctx, axl_bool free_ctx)
 Terminates the myqtt library execution on the provided context. More...
 
axl_bool myqtt_init_check (MyQttCtx *ctx)
 Allows to check if the provided MyQttCtx is initialized (myqtt_init_ctx). More...
 
axl_bool myqtt_init_ctx (MyQttCtx *ctx)
 Context based myqtt library init. More...
 
axl_bool myqtt_is_exiting (MyQttCtx *ctx)
 Allows to check if myqtt engine started on the provided context is finishing (a call to myqtt_exit_ctx was done). More...
 
void myqtt_log2_enable (MyQttCtx *ctx, axl_bool status)
 Enable console second level myqtt log. More...
 
axl_bool myqtt_log2_is_enabled (MyQttCtx *ctx)
 Allows to get current status for second level log debug info to console. More...
 
void myqtt_log_acquire_mutex (MyQttCtx *ctx, axl_bool status)
 If activate the console debug, it may happen that some messages are mixed because several threads are producing them at the same time. More...
 
void myqtt_log_enable (MyQttCtx *ctx, axl_bool status)
 Enable console myqtt log. More...
 
axl_bool myqtt_log_filter_is_enabled (MyQttCtx *ctx)
 Allows to check if current MYQTT_DEBUG_FILTER is enabled. More...
 
void myqtt_log_filter_level (MyQttCtx *ctx, const char *filter_string)
 Allows to configure which levels will be filtered from log output. More...
 
MyQttLogHandler myqtt_log_get_handler (MyQttCtx *ctx)
 Allows to get current log handler configured. More...
 
axl_bool myqtt_log_is_enabled (MyQttCtx *ctx)
 Allows to get current status for log debug info to console. More...
 
axl_bool myqtt_log_is_enabled_acquire_mutex (MyQttCtx *ctx)
 Allows to check if the log mutex acquire is activated. More...
 
void myqtt_log_set_handler (MyQttCtx *ctx, MyQttLogHandler handler, axlPointer user_data)
 Allows to configure an application handler that will be called for each log produced by the myqtt engine. More...
 
void myqtt_log_set_prepare_log (MyQttCtx *ctx, axl_bool prepare_string)
 Allows to instruct myqtt to send string logs already formated into the log handler configured (myqtt_log_set_handler). More...
 
int myqtt_mkdir (MyQttCtx *ctx, const char *path, int mode)
 Allows to create the provided directory by checking and creating all the middle components. More...
 
void myqtt_sleep (long microseconds)
 Portable subsecond sleep. More...
 

Detailed Description