From 925a503604374a492cb244b1243d6af29aefd2fc Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Tue, 8 Aug 2023 23:07:47 -0400 Subject: [PATCH] doc --- src/Tiny_httpd_io.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Tiny_httpd_io.ml b/src/Tiny_httpd_io.ml index 654d8608..bd829e49 100644 --- a/src/Tiny_httpd_io.ml +++ b/src/Tiny_httpd_io.ml @@ -165,8 +165,10 @@ module Writer = struct Give it an output channel and it will write the bytes in it. This is useful for responses: an http endpoint can return a writer - as its response's body, and output into it as if it were a regular + as its response's body; the writer is given access to the connection + to the client and can write into it as if it were a regular [out_channel], including controlling calls to [flush]. + Tiny_httpd will convert these writes into valid HTTP chunks. @since 0.14 *) @@ -187,7 +189,8 @@ end (** A TCP server abstraction. *) module TCP_server = struct type conn_handler = { - handle: client_addr:Unix.sockaddr -> Input.t -> Output.t -> unit; (** Handle client connection *) + handle: client_addr:Unix.sockaddr -> Input.t -> Output.t -> unit; + (** Handle client connection *) } type t = {