diff --git a/dev/tiny_httpd/Tiny_httpd_buf/index.html b/dev/tiny_httpd/Tiny_httpd_buf/index.html index 87b4027e..d42bfe3e 100644 --- a/dev/tiny_httpd/Tiny_httpd_buf/index.html +++ b/dev/tiny_httpd/Tiny_httpd_buf/index.html @@ -1,2 +1,2 @@ -
Tiny_httpd_bufSimple buffer.
These buffers are used to avoid allocating too many byte arrays when processing streams and parsing requests.
val size : t -> intval clear : t -> unitval create : ?size:int -> unit -> tval contents : t -> stringval bytes_slice : t -> bytesAccess underlying slice of bytes.
val contents_and_clear : t -> stringGet contents of the buffer and clear it.
val add_bytes : t -> bytes -> int -> int -> unitAppend given bytes slice to the buffer.
Tiny_httpd_bufSimple buffer.
These buffers are used to avoid allocating too many byte arrays when processing streams and parsing requests.
val size : t -> intval clear : t -> unitval create : ?size:int -> unit -> tval contents : t -> stringval bytes_slice : t -> bytesAccess underlying slice of bytes.
val contents_and_clear : t -> stringGet contents of the buffer and clear it.
val add_bytes : t -> bytes -> int -> int -> unitAppend given bytes slice to the buffer.
Tiny_httpd_dir.Embedded_fsAn embedded file system, as a list of files with (relative) paths. This is useful in combination with the "tiny-httpd-mkfs" tool, which embeds the files it's given into a OCaml module.
val create : ?mtime:float -> unit -> tval add_file : ?mtime:float -> t -> path:string -> string -> unitAdd file to the virtual file system.
Tiny_httpd_dir.Embedded_fsAn embedded file system, as a list of files with (relative) paths. This is useful in combination with the "tiny-httpd-mkfs" tool, which embeds the files it's given into a OCaml module.
val create : ?mtime:float -> unit -> tval add_file : ?mtime:float -> t -> path:string -> string -> unitAdd file to the virtual file system.
Build a config from default_config.
val add_dir_path :
+ configBuild a config from default_config.
val add_dir_path :
config:config ->
dir:string ->
prefix:string ->
Tiny_httpd_server.t ->
- unitadd_dirpath ~config ~dir ~prefix server adds route handle to the server to serve static files in dir when url starts with prefix, using the given configuration config.
module type VFS = sig ... endVirtual file system.
val vfs_of_dir : string -> (module VFS)vfs_of_dir dir makes a virtual file system that reads from the disk.
add_dirpath ~config ~dir ~prefix server adds route handle to the server to serve static files in dir when url starts with prefix, using the given configuration config.
module type VFS = sig ... endVirtual file system.
val vfs_of_dir : string -> (module VFS)vfs_of_dir dir makes a virtual file system that reads from the disk.
val add_vfs :
config:config ->
vfs:(module VFS) ->
prefix:string ->
Tiny_httpd_server.t ->
- unitSimilar to add_dir_path but using a virtual file system instead.
module Embedded_fs : sig ... endAn embedded file system, as a list of files with (relative) paths. This is useful in combination with the "tiny-httpd-mkfs" tool, which embeds the files it's given into a OCaml module.