From 91e835ea6042c48d6c67b6cb0b2f9fcc657328b0 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Wed, 30 Mar 2022 12:25:41 -0400 Subject: [PATCH] docstrings --- src/Tiny_httpd.mli | 1 + src/Tiny_httpd_server.mli | 4 +++- src/Tiny_httpd_stream.mli | 8 ++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Tiny_httpd.mli b/src/Tiny_httpd.mli index 7daba83b..c6e79d9a 100644 --- a/src/Tiny_httpd.mli +++ b/src/Tiny_httpd.mli @@ -92,6 +92,7 @@ module Byte_stream = Tiny_httpd_stream (** {2 Main Server Type} *) +(** @inline *) include module type of struct include Tiny_httpd_server end (** {2 Utils} *) diff --git a/src/Tiny_httpd_server.mli b/src/Tiny_httpd_server.mli index 59eaacec..075e14f7 100644 --- a/src/Tiny_httpd_server.mli +++ b/src/Tiny_httpd_server.mli @@ -1,10 +1,12 @@ (** HTTP server. - This library implements a very simple, basic HTTP/1.1 server using blocking + This module implements a very simple, basic HTTP/1.1 server using blocking IOs and threads. It is possible to use a thread pool, see {!create}'s argument [new_thread]. + + @since NEXT_RELEASE *) type buf = Tiny_httpd_buf.t diff --git a/src/Tiny_httpd_stream.mli b/src/Tiny_httpd_stream.mli index 13ccb168..fbb2d287 100644 --- a/src/Tiny_httpd_stream.mli +++ b/src/Tiny_httpd_stream.mli @@ -1,5 +1,11 @@ +(** Byte streams. + + These used to live in {!Tiny_httpd} but are now in their own module. + @since 0.12 *) + type hidden +(** Type used to make {!t} unbuildable via a record literal. Use {!make} instead. *) type t = { mutable bs: bytes; @@ -33,8 +39,10 @@ type t = { See {!Byte_stream} for more details. *) val close : t -> unit +(** Close stream *) val empty : t +(** Stream with 0 bytes inside *) val of_chan : ?buf_size:int -> in_channel -> t (** Make a buffered stream from the given channel. *)