diff --git a/dev/index.html b/dev/index.html index 2a56ec32..9e380f8b 100644 --- a/dev/index.html +++ b/dev/index.html @@ -11,8 +11,8 @@
Add a handler on an endpoint, that serves server-sent events.
The callback is given a generator that can be used to send events as it pleases. The connection is always closed by the client, and the accepted method is always GET. This will set the header "content-type" to "text/event-stream" automatically and reply with a 200 immediately. See server_sent_generator for more details.
This handler stays on the original thread (it is synchronous).
val stop : t -> unitAsk the server to stop. This might not have an immediate effect as run might currently be waiting on IO.
val run : ?after_init:(unit -> unit) -> t -> (unit, exn) Stdlib.resultRun the main loop of the server, listening on a socket described at the server's creation time, using new_thread to start a thread for each new client.
This returns Ok () if the server exits gracefully, or Error e if it exits with an error.
module Util = Tiny_httpd_utilmodule Dir = Tiny_httpd_dirmodule Html = Tiny_httpd_htmlAlias to Tiny_httpd_html