Next: , Previous: , Up: Embedding API   [Contents][Index]

5.2.14 Boot functions

The most important functions are svz_boot and svz_halt which must be the first and the last call to the core API.

Function: void svz_boot (char const *client)

Initialize the core library. client is typically a program’s argv[0]. If NULL, take it to be ‘anonymous’.

Function: long svz_uptime (void)

Return the number of seconds since svz_boot was called, or -1 if svz_boot has not yet been called.

Function: void svz_halt (void)

Finalization of the core library. Runtime parameters

There are several runtime parameters indicating the abilities of the libserveez core API:


The log-level verbosity.


Maxium number of clients allowed to connect.

These are manipulated by svz_runparm and two convenience macros, both of which accept nick, a C token without the prefix ‘SVZ_RUNPARM_’ (e.g., VERBOSITY).

Function: int svz_runparm (int a, int b)

Set or get a runtime parameter. If a is -1, return the value of runtime parameter b. If a specifies a runtime parameter, set it to b and return 0. Otherwise, return -1.

Macro: SVZ_RUNPARM (nick)

Return the value of runtime parameter nick.

Macro: SVZ_RUNPARM_X (nick, val)

Set the runtime paramater nick to have value val, an integer.