diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-08-20 11:09:23 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-08-20 11:09:23 -0700 |
| commit | c72bd53e2c5b4bc7207bfa1710ccff47655a099a (patch) | |
| tree | f85e26882244430c41930c45d83887d5b01969cc /docs/man/nng_http_handler_alloc.3http.adoc | |
| parent | 6e5f6a26beec0a44d25625cacb5095cdc7a94146 (diff) | |
| download | nng-c72bd53e2c5b4bc7207bfa1710ccff47655a099a.tar.gz nng-c72bd53e2c5b4bc7207bfa1710ccff47655a099a.tar.bz2 nng-c72bd53e2c5b4bc7207bfa1710ccff47655a099a.zip | |
fixes #506 AIO "providers" need a way to call nni_aio_schedule.
Diffstat (limited to 'docs/man/nng_http_handler_alloc.3http.adoc')
| -rw-r--r-- | docs/man/nng_http_handler_alloc.3http.adoc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/docs/man/nng_http_handler_alloc.3http.adoc b/docs/man/nng_http_handler_alloc.3http.adoc index 187b91b6..523b5328 100644 --- a/docs/man/nng_http_handler_alloc.3http.adoc +++ b/docs/man/nng_http_handler_alloc.3http.adoc @@ -63,7 +63,8 @@ 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. -That structure will be passed with the following input values (retrieved with + +The _aio_ will be passed with the following input values (retrieved with `<<nng_aio_get_input.3#,nng_aio_get_input()>>`): 0: `nng_http_req *` __request__:: The client's HTTP request. @@ -86,6 +87,13 @@ If any non-zero status is returned back to the caller instead, then a generic 500 response will be created and sent, if possible, and the connection will be closed. +The _aio_ may be scheduled for deferred completion using the +`<<nng_aio_defer.3#,nng_aio_defer()>>` function. + +NOTE: The callback function should *NOT* call +`<<nng_aio_begin.3#,nng_aio_begin()>>`, +as that will already have been done by the server framework. + === Directory Handler The second member of this family, `nng_http_handler_alloc_directory()`, creates @@ -137,6 +145,7 @@ This function returns 0 on success, and non-zero otherwise. == SEE ALSO [.text-left] +<<nng_aio_defer.3#,nng_aio_defer(3)>>, <<nng_aio_finish.3#,nng_aio_finish(3)>>, <<nng_aio_get_input.3#,nng_aio_get_input(3)>>, <<nng_aio_set_output.3#,nng_aio_set_output(3)>>, |
