diff options
| author | Robert Bielik <robert.bielik@dirac.com> | 2020-01-28 07:43:09 +0100 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2020-01-27 22:43:09 -0800 |
| commit | 2545add6240145b419357b9260ae5e8c0d95ba6c (patch) | |
| tree | 155ae2ccfc4c720df7206c7fc81f68531624bc35 /src/supplemental/http/http_public.c | |
| parent | 9414a69a9575564d04022aef9bd898028e52bf09 (diff) | |
| download | nng-2545add6240145b419357b9260ae5e8c0d95ba6c.tar.gz nng-2545add6240145b419357b9260ae5e8c0d95ba6c.tar.bz2 nng-2545add6240145b419357b9260ae5e8c0d95ba6c.zip | |
Add possibility to explicitly set a tree handler as exclusive (#1158)
- Default tree handler behavior is now non-exclusive
- Add 'longest uri first' ordering for http handlers
Diffstat (limited to 'src/supplemental/http/http_public.c')
| -rw-r--r-- | src/supplemental/http/http_public.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/supplemental/http/http_public.c b/src/supplemental/http/http_public.c index d2e876ab..60ca2693 100644 --- a/src/supplemental/http/http_public.c +++ b/src/supplemental/http/http_public.c @@ -636,6 +636,17 @@ nng_http_handler_set_tree(nng_http_handler *h) } int +nng_http_handler_set_tree_exclusive(nng_http_handler *h) +{ +#ifdef NNG_SUPP_HTTP + return (nni_http_handler_set_tree_exclusive(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 *)) { #ifdef NNG_SUPP_HTTP |
