C Collections

chttpserver · Section 3

chttpsvr_construct

chttpsvr_construct - declare and initialize a chttpsvr handle

C Collections (libccollections, -lccollections)

#include <ccollections/chttpserver.h>
 
chttpsvr_construct(name, cl);

Declares a chttpsvr variable called name and assigns it the result
of chttpsvr_create(cl, &err), where err is an error string that the
macro keeps for itself.  If the create fails, the macro calls
ccol__fatal_err() with a message that names the variable and carries
that error string, and it does not return.

name     The identifier for the new handle variable.
cl       The parent logger.  The server derives its own logger from
         it.  With CLOG_NULL the server uses an internal logger
         that writes only FATAL messages to stderr; see
         chttpsvr_create_mp for the details.

chttpsvr_construct_scoped(3), chttpsvr_declare(3), chttpsvr_create(3)