#include <stddef.h>Go to the source code of this file.
Classes | |
| struct | anch_rest_str_t |
| struct | anch_rest_header_t |
| struct | anch_rest_body_reader_t |
| struct | anch_rest_request_t |
| struct | anch_rest_response_writer_t |
| struct | anch_rest_application_t |
Macros | |
| #define | ANCH_REST_NGINX_ABI_VERSION 2u |
| #define | ANCH_REST_APPLICATION_SYMBOL "anch_rest_application" |
| #define | ANCH_REST_READ_ERROR ((size_t) -1) |
| #define | ANCH_REST_UNKNOWN_LENGTH (-1LL) |
Typedefs | |
| typedef const anch_rest_application_t *(*) | anch_rest_application_fn(void) |
AnCH REST nginx module C ABI.
An application is a shared library which exports anch_rest_application (see ANCH_REST_APPLICATION in rest/nginxApplication.hpp ). The nginx module loads it with dlopen , creates one application per worker process, and calls handle from nginx thread pool threads (or from the event loop when thread pool is disabled).
Request and response bodies are streamed: the application reads the request body with anch_rest_body_reader_t and writes the response with anch_rest_response_writer_t . In a thread pool, these functions block until nginx has received or sent data.
| #define ANCH_REST_APPLICATION_SYMBOL "anch_rest_application" |
Application entry point symbol
| #define ANCH_REST_NGINX_ABI_VERSION 2u |
ABI version: the module refuses applications with another version
| #define ANCH_REST_READ_ERROR ((size_t) -1) |
Error returned by anch_rest_body_reader_t read function
| #define ANCH_REST_UNKNOWN_LENGTH (-1LL) |
Unknown response content length (body is sent with chunked transfer encoding)
| typedef const anch_rest_application_t *(*) anch_rest_application_fn(void) |
Application entry point type