From 9b886a9999247d87c9f6d389c3e65a4bd39be010 Mon Sep 17 00:00:00 2001 From: Vincent Nonnenmacher Date: Fri, 16 Mar 2018 15:06:34 +0100 Subject: Fixes issues found by (and submitted by) @nonnenmacher when working on a python wrapper (cffi). Mostly this is fixing inconsistencies in our public API and the actual implementation. --- src/supplemental/http/http_public.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/supplemental/http') diff --git a/src/supplemental/http/http_public.c b/src/supplemental/http/http_public.c index 2d879807..7107c029 100644 --- a/src/supplemental/http/http_public.c +++ b/src/supplemental/http/http_public.c @@ -574,6 +574,16 @@ nng_http_handler_set_host(nng_http_handler *h, const char *host) #endif } +int nng_http_handler_set_tree(nng_http_handler *h) +{ +#ifdef NNG_SUPP_HTTP + return (nni_http_handler_set_tree(h)); +#else + NNI_ARG_UNUSED(h); + return (NNG_ENOTSUP); +#endif +} + int nng_http_handler_set_data(nng_http_handler *h, void *dat, void (*dtor)(void *)) { @@ -588,7 +598,7 @@ nng_http_handler_set_data(nng_http_handler *h, void *dat, void (*dtor)(void *)) } void * -nng_handler_get_data(nng_http_handler *h) +nng_http_handler_get_data(nng_http_handler *h) { #ifdef NNG_SUPP_HTTP return (nni_http_handler_get_data(h)); @@ -688,6 +698,16 @@ nng_http_server_get_tls(nng_http_server *srv, nng_tls_config **cfgp) #endif } +int nng_http_hijack(nng_http_conn * conn) +{ +#ifdef NNG_SUPP_HTTP + return (nni_http_hijack(conn)); +#else + NNI_ARG_UNUSED(conn); + return (NNG_ENOTSUP); +#endif +} + int nng_http_client_alloc(nng_http_client **clip, const nng_url *url) { -- cgit v1.2.3-70-g09d2