diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-05-01 17:11:32 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-05-01 19:18:37 -0700 |
| commit | 3d3fa690c4f81bf4ed0a2de42c3c8fbb9f4cca5c (patch) | |
| tree | d670fc9ac327e017c62a72cbaeda4bcacda5f9dd /docs/man/nng_http_handler_alloc.3http.adoc | |
| parent | 1ef281a7fbd544c6d3384fd8a71d10dc4bb081e8 (diff) | |
| download | nng-3d3fa690c4f81bf4ed0a2de42c3c8fbb9f4cca5c.tar.gz nng-3d3fa690c4f81bf4ed0a2de42c3c8fbb9f4cca5c.tar.bz2 nng-3d3fa690c4f81bf4ed0a2de42c3c8fbb9f4cca5c.zip | |
Markup fixes, ensuring links are colored properly.
It turns out that when creating cross references, we need to
make any text styling (generally literal characters) outside of
the link, to avoid having the styling override the link color.
(We prefer to have links colored for ease of use.)
While here a few other markup, and actual content, errors were fixed.
Diffstat (limited to 'docs/man/nng_http_handler_alloc.3http.adoc')
| -rw-r--r-- | docs/man/nng_http_handler_alloc.3http.adoc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/man/nng_http_handler_alloc.3http.adoc b/docs/man/nng_http_handler_alloc.3http.adoc index 12c6043a..be6f2568 100644 --- a/docs/man/nng_http_handler_alloc.3http.adoc +++ b/docs/man/nng_http_handler_alloc.3http.adoc @@ -49,38 +49,38 @@ considered when determining whether the handler should be called. Additionally each handler has a method it is registered to handle (the default is "GET", see -<<nng_http_handler_set_method.3http#,`nng_http_handler_set_method()`>>), and +`<<nng_http_handler_set_method.3http#,nng_http_handler_set_method()>>`), and optionally a 'Host' header it can be matched against (see -<<nng_http_handler_set_host.3http#,`nng_http_handler_set_host()`>>). +`<<nng_http_handler_set_host.3http#,nng_http_handler_set_host()>>`). In some cases, a handler may reference a logical tree rather (directory) rather than just a single element. -(See <<nng_http_handler_set_tree.3http#,`nng_http_handler_set_tree()`>>). +(See `<<nng_http_handler_set_tree.3http#,nng_http_handler_set_tree()>>`). === Custom Handler The generic (first) form of this creates a handler that uses a user-supplied function to process HTTP requests. This function uses the asynchronous I/O framework. -The function takes a pointer to an <<nng_aio.5#,`nng_aio`>> structure. +The function takes a pointer to an `<<nng_aio.5#,nng_aio>>` structure. That structure will be passed with the following input values (retrieved with -<<nng_aio_get_input.3#,`nng_aio_get_input()`>>): +`<<nng_aio_get_input.3#,nng_aio_get_input()>>`): 0: `nng_http_req *` __request__:: The client's HTTP request. 1: `nng_http_handler *` __handler__:: Pointer to the handler object. 2: `nng_http_conn *` __conn__:: The underlying HTTP connection. The handler should create an `nng_http_res *` response (such as via -<<nng_http_res_alloc.3http#,`nng_http_res_alloc()`>> or -<<nng_http_res_alloc_error.3http#,`nng_http_res_alloc_error()`>>) and store that +`<<nng_http_res_alloc.3http#,nng_http_res_alloc()>>` or +`<<nng_http_res_alloc_error.3http#,nng_http_res_alloc_error()>>`) and store that in as the first output (index 0) with -<<nng_aio_set_output.3#,`nng_aio_set_output()`>>. +`<<nng_aio_set_output.3#,nng_aio_set_output()>>`. Alternatively, the handler may send the HTTP response (and any associated body data) itself using the connection. In that case the output at index 0 of the _aio_ should be NULL. -Finally, using the <<nng_aio_finish.3#,`nng_aio_finish()`>> function, the +Finally, using the `<<nng_aio_finish.3#,nng_aio_finish()>>` function, the _aio_ should be completed successfully. If any non-zero status is returned back to the caller instead, then a generic 500 response will be created and |
