Next: , Previous: Functions Reference, Up: Functions Reference


9.1 listserv_init and listserv_destroy

— Function: struct listserv* listserv_init (const char *email, const char *password, const char *host);

Initializes a struct listserv* and makes possible subsequent execution of commands over TCPGUI.

If password is NULL, the parameters are read from a config file. For defails, see configuration-file.

If no configuration file is found, an error message is printed at stderr, and the function returns NULL.

If email is NULL, then @ is used as email.

The host is in the host:port format. If the :port part is missing, 2306 is assumed.

If host is NULL, localhost is assumed.

listserv_init does not check if it is possible to connect with the provided information, the email/password/port combination is valid, or if listserv is runniung.

— Function: void listserv_destroy (struct listserv *l);

Frees the memory allocated by function invocations using this struct listserv* .