Shadow Network Framework
0.0.2-alpha
C Server Library for Shadow Network Framework
|
this file Defines everything related to Globaly accessed variable More...
Go to the source code of this file.
Macros | |
#define | SNF_N_VARS ((int)SNF_VAR_INITIALIZED + 1) |
Returns the amount of variables registred in this structure. | |
#define | snf_var_geta(VARNAME, TYPE) |
The same as snf_var_geta_void but casts the return from (void **) into (TYPE **) | |
#define | snf_var_get(VARNAME, TYPE) |
Derenferences the return of snf_var_geta from TYPE** into TYPE *. | |
#define | snf_var_getv(VARNAME, TYPE) |
Dereferences the return of snf_var_get from TYPE * to TYPE. | |
Typedefs | |
typedef enum SNF_VARS_e | SNF_VARS |
This Enum saved the identifiers for variables available as of this version. | |
Enumerations | |
enum | SNF_VARS_e { SNF_VAR_THREADS , SNF_VAR_THREADPOOL , SNF_VAR_PORT , SNF_VAR_MAX_QUEUE , SNF_VAR_OPCODE_INIS , SNF_VAR_EPOLL_MAXEVENTS , SNF_VAR_EPOLL_EVENTS , SNF_VAR_EPOLL_TIMEOUT , SNF_VAR_CLTS_INITIAL , SNF_VAR_RQST_MAX_LENGTH , SNF_VAR_INITIALIZED } |
This Enum saved the identifiers for variables available as of this version. More... | |
Functions | |
void | snf_var_default () |
Defaults and allocates the variables. | |
void ** | snf_var_geta_void (SNF_VARS VARNAME) |
Returns the address of the void* pointer of the variable. | |
void | snf_var_set (SNF_VARS VARNAME, void *Value) |
Allows to set the value of a variable. | |
this file Defines everything related to Globaly accessed variable
This file serves as a way to put the variables that are required to be globally accessed, as this will ease for developper's access to them and store them in one place instead of them being scattered in different files.
#define SNF_N_VARS ((int)SNF_VAR_INITIALIZED + 1) |
Returns the amount of variables registred in this structure.
#define snf_var_geta | ( | VARNAME, | |
TYPE ) |
The same as snf_var_geta_void but casts the return from (void **) into (TYPE **)
VARNAME | Variable's identifier |
TYPE | Variable's pointer's type |
#define snf_var_get | ( | VARNAME, | |
TYPE ) |
Derenferences the return of snf_var_geta from TYPE** into TYPE *.
VARNAME | Variable's identifier |
TYPE | Variable's pointer type |
#define snf_var_getv | ( | VARNAME, | |
TYPE ) |
Dereferences the return of snf_var_get from TYPE * to TYPE.
VARNAME | Variable's identifier |
TYPE | Variable's Type |
typedef enum SNF_VARS_e SNF_VARS |
This Enum saved the identifiers for variables available as of this version.
enum SNF_VARS_e |
This Enum saved the identifiers for variables available as of this version.
Enumerator | |
---|---|
SNF_VAR_THREADS | Variable for threads used by SNF Type: int
|
SNF_VAR_THREADPOOL | Variable for saving the threadpool instance Type: SNF_thpool
|
SNF_VAR_PORT | Variable for saving the port used by SNF Type: int |
SNF_VAR_MAX_QUEUE | Variable for saving maximum connections that are able to queue while waiting forthe server to accept, (aka passed as a parameter to listen()) Type: int |
SNF_VAR_OPCODE_INIS | Variable for saving if SNF_VAR_OPCODE_INIS Type: int
|
SNF_VAR_EPOLL_MAXEVENTS | Variable for saving the amount possible of concurrent connections ( See limitations of epoll ) Type: int |
SNF_VAR_EPOLL_EVENTS | Variable for saving events that are used by epoll Type: struct event_epoll *
|
SNF_VAR_EPOLL_TIMEOUT | Variable for saving the maximum timeout in miliseconds for epoll_wait() Type: _Atomic int |
SNF_VAR_CLTS_INITIAL | Variable for the amount of initially planned amount of client to connect, for the Hashtable saving the clients Type: int
|
SNF_VAR_RQST_MAX_LENGTH | Variable for saving the maximum allowed length of a Request Type: int |
SNF_VAR_INITIALIZED | Variable for saving if the Variables has been defaulted and/or initalized before. Type: int
|
|
extern |
Defaults and allocates the variables.
|
extern |
Returns the address of the void* pointer of the variable.
VARNAME | Variable's Idnetifier |