Next: , Up: Server functions   [Contents][Index] Server functionality

This section contains functions dealing with the list of known servers in the core library of Serveez, also with the basics like creation and destruction of such servers.

Function: void svz_foreach_server (svz_server_do_t *func, void *closure)

Call func for each server, passing additionally the second arg closure.

Function: svz_server_t * svz_server_find (void *cfg)

Find a server instance by the given configuration structure cfg. Return NULL if there is no such configuration in any server instance.

Function: svz_array_t * svz_server_clients (svz_server_t *server)

Return a list of clients (socket structures) which are associated with the given server instance server. If there is no such socket, return NULL. Caller should svz_array_destroy the returned array.

Function: svz_server_t * svz_server_get (char *name)

Get the server instance with the given instance name name. Return NULL if there is no such server yet.

Function: int svz_updn_all_servers (int direction)

If direction is non-zero, run the initializers of all servers, returning -1 if some server did not think it is a good idea to run. Otherwise, run the local finalizers for all server instances.