Plasma GitLab Archive
Projects Blog Knowledge

Class Nethttpd_engine.http_engine


class http_engine : on_request_header:(http_request_header_notification -> unit) -> unit -> #http_engine_config -> Unix.file_descr -> Unixqueue.unix_event_system -> [unit] Uq_engines.engine
This engine processes the requests arriving on the file descriptor using the Unix event system. Whenever a new request header arrives, the function on_request_header is called back, and must handle the request.

Unless aborted using the abort method, this engine is always successful. Errors are logged, but not returned as result.

The file descriptor is closed after processing all HTTP requests and responses. It is also closed on error and when the engine is aborted.

An aborted engine does not try to clean up resources external to the engine, e.g. by calling the on_error functions. This is up to the user.


This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml