67 lines
1.5 KiB
C
67 lines
1.5 KiB
C
/******************************************************************************
|
|
*
|
|
* Copyright (c) 2017-2019 by Löwenware Ltd
|
|
* Please, refer LICENSE file for legal information
|
|
*
|
|
******************************************************************************/
|
|
|
|
/**
|
|
* @file aisl/config.h
|
|
* @author Ilja Kartašov <ik@lowenware.com>
|
|
* @brief Declarations of AISL configuration structures
|
|
*
|
|
* @see https://lowenware.com/aisl/
|
|
*/
|
|
|
|
#ifndef AISL_CONFIG_H_DB67A89B_5CAF_4A5F_AEB1_6DB9F84827D6
|
|
#define AISL_CONFIG_H_DB67A89B_5CAF_4A5F_AEB1_6DB9F84827D6
|
|
|
|
#include <aisl/types.h>
|
|
|
|
#define AISL_CFG_DEFAULT { \
|
|
.callback = NULL \
|
|
, .p_ctx = NULL \
|
|
, .srv = NULL \
|
|
, .ssl = NULL \
|
|
, .srv_cnt = 0 \
|
|
, .ssl_cnt = 0 \
|
|
, .client_spool_size = 32 \
|
|
, .initial_buffer_size = 16536 \
|
|
, .client_accept_limit = 1024 \
|
|
, .client_silence_timeout = 30 \
|
|
} \
|
|
|
|
|
|
struct aisl_cfg_srv {
|
|
const char * host;
|
|
uint16_t port;
|
|
bool secure;
|
|
};
|
|
|
|
struct aisl_cfg_ssl {
|
|
const char * host;
|
|
const char * key_file;
|
|
const char * crt_file;
|
|
};
|
|
|
|
|
|
struct aisl_cfg
|
|
{
|
|
/* event handlers */
|
|
AislCallback callback;
|
|
void *p_ctx;
|
|
|
|
struct aisl_cfg_srv *srv;
|
|
struct aisl_cfg_ssl *ssl;
|
|
|
|
int srv_cnt;
|
|
int ssl_cnt;
|
|
|
|
int client_spool_size;
|
|
int initial_buffer_size;
|
|
int client_accept_limit;
|
|
int client_silence_timeout;
|
|
};
|
|
|
|
#endif /* !AISL_CONFIG_H */
|