LIBBOZOHTTPD(3)         NetBSD Library Functions Manual        LIBBOZOHTTPD(3)


NAME
libbozohttpd -- embedded web server library
LIBRARY
library ``libbozohttpd''
SYNOPSIS
#include <bozohttpd.h> int bozo_set_pref(bozohttpd_t *httpd, bozoprefs_t *prefs, char *name, char *value); char * bozo_get_pref(bozoprefs_t *prefs, char *name); int bozo_set_defaults(bozohttpd_t *httpd, bozoprefs_t *prefs); void bozo_setup(bozohttpd_t *httpd, bozoprefs_t *prefs, const char *vhost, char *slash); bozo_httpreq_t * bozo_read_request(bozohttpd_t *httpd); void bozo_process_request(bozo_httpreq_t *); void bozo_clean_request(bozo_httpreq_t *);
DESCRIPTION
libbozohttpd is a library interface to the bozohttpd(8) web server. The libbozohttpd library can be used to embed a webserver in your applica- tions. Normal operation sees the libbozohttpd process be initialised using the bozo_set_defaults() function, which will set up the default port and other internal settings, allocating any necessary space as needed. The bozo_set_defaults() function returns 1 on sucess, 0 on failure. The bozo_setup() function is used to specify the virtual host name for the web server. A NULL host name will mean that libbozohttpd will use the local value for the host name, as returned by gethostname(3). This virtual hostname should be a fully qualified domain name. The final argument to bozo_setup() is the name of the directory to serve as the root directory of the web server tree. Once the server has been set up, it serves requests by using the bozo_read_request() function, which returns a pointer to a request struc- ture, and bozo_process_request(), which deals with the request, and answers the client. The request space is de-allocated using the bozo_clean_request() function. Preferences are set using the function bozo_set_pref() function and queried using the two bozo_get_pref() function. This is the main inter- face for selecting options, and for setting preferences.
SEE ALSO
gethostname(3), ssl(3), services(5), httpd(8)
HISTORY
The libbozohttpd library first appeared in NetBSD 6.0.
AUTHORS
Matthew R. Green <mrg@eterna.com.au> Alistair Crooks <agc@NetBSD.org> wrote this high-level interface. This manual page was written by Alistair Crooks. NetBSD 9.0 February 2, 2017 NetBSD 9.0

You can also request any man page by name and (optionally) by section:

Command: 
Section: 
Architecture: 
Collection: 
 

Use the DEFAULT collection to view manual pages for third-party software.


Powered by man-cgi 1.15, Panagiotis Christias
Modified for NetBSD by Kimmo Suominen