docstrings

This commit is contained in:
Simon Cruanes 2022-03-30 12:25:41 -04:00
parent 02500dfb38
commit 91e835ea60
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
3 changed files with 12 additions and 1 deletions

View file

@ -92,6 +92,7 @@ module Byte_stream = Tiny_httpd_stream
(** {2 Main Server Type} *) (** {2 Main Server Type} *)
(** @inline *)
include module type of struct include Tiny_httpd_server end include module type of struct include Tiny_httpd_server end
(** {2 Utils} *) (** {2 Utils} *)

View file

@ -1,10 +1,12 @@
(** HTTP server. (** 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. IOs and threads.
It is possible to use a thread pool, see {!create}'s argument [new_thread]. It is possible to use a thread pool, see {!create}'s argument [new_thread].
@since NEXT_RELEASE
*) *)
type buf = Tiny_httpd_buf.t type buf = Tiny_httpd_buf.t

View file

@ -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 hidden
(** Type used to make {!t} unbuildable via a record literal. Use {!make} instead. *)
type t = { type t = {
mutable bs: bytes; mutable bs: bytes;
@ -33,8 +39,10 @@ type t = {
See {!Byte_stream} for more details. *) See {!Byte_stream} for more details. *)
val close : t -> unit val close : t -> unit
(** Close stream *)
val empty : t val empty : t
(** Stream with 0 bytes inside *)
val of_chan : ?buf_size:int -> in_channel -> t val of_chan : ?buf_size:int -> in_channel -> t
(** Make a buffered stream from the given channel. *) (** Make a buffered stream from the given channel. *)