#include <nng/nng.h> #include <nng/supplemental/http/http.h> int nng_http_server_add_handler(nng_http_server *s, nng_http_handler *h);
|This documentation is for the TIP (development tree) of NNG and may represent unreleased changes or functionality that is experimental, and is subject to change before release. The latest released version is v1.3.2. See the documentation for v1.3.2 for the most up-to-date information.|
nng_http_server_add_handler - add HTTP server handler
nng_http_server_add_handler() adds the handler h to the server
If another handler is already added to the server that would conflict
with handler h, then the operation will fail with
If a handler is added to a server, and the server is subsequently deallocated, the handler and any of its resources will also be deallocated.
Handlers that are added to a server may be subsequently removed using the
This function returns 0 on success, and non-zero otherwise.
Handler conflicts with another handler.
Insufficient free memory exists.
HTTP not supported.