mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 11:15:35 -05:00
deploy: 91c99c0e04
This commit is contained in:
parent
95817fb169
commit
658378534d
48 changed files with 0 additions and 915 deletions
File diff suppressed because one or more lines are too long
20
index.html
20
index.html
|
|
@ -1,20 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>index</title>
|
|
||||||
<link rel="stylesheet" href="./odoc.css"/>
|
|
||||||
<meta charset="utf-8"/>
|
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<main class="content">
|
|
||||||
<div class="by-name">
|
|
||||||
<h2>OCaml package documentation</h2>
|
|
||||||
<ol>
|
|
||||||
<li><a href="tiny_httpd/index.html">tiny_httpd</a> <span class="version">0.14</span></li>
|
|
||||||
<li><a href="tiny_httpd_camlzip/index.html">tiny_httpd_camlzip</a> <span class="version">0.14</span></li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
</main>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
764
odoc.css
764
odoc.css
|
|
@ -1,764 +0,0 @@
|
||||||
@charset "UTF-8";
|
|
||||||
/* Copyright (c) 2016 The odoc contributors. All rights reserved.
|
|
||||||
Distributed under the ISC license, see terms at the end of the file.
|
|
||||||
odoc 1.5.3 */
|
|
||||||
|
|
||||||
/* Fonts */
|
|
||||||
@import url('https://fonts.googleapis.com/css?family=Fira+Mono:400,500');
|
|
||||||
@import url('https://fonts.googleapis.com/css?family=Noticia+Text:400,400i,700');
|
|
||||||
@import url('https://fonts.googleapis.com/css?family=Fira+Sans:400,400i,500,500i,600,600i,700,700i');
|
|
||||||
|
|
||||||
|
|
||||||
/* Reset a few things. */
|
|
||||||
|
|
||||||
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
border: 0;
|
|
||||||
font-size: inherit;
|
|
||||||
font: inherit;
|
|
||||||
line-height: inherit;
|
|
||||||
vertical-align: baseline;
|
|
||||||
text-align: inherit;
|
|
||||||
color: inherit;
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
border-collapse: collapse;
|
|
||||||
border-spacing: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
*, *:before, *:after {
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
html {
|
|
||||||
font-size: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
font-family: "Fira Sans", Helvetica, Arial, sans-serif;
|
|
||||||
text-align: left;
|
|
||||||
color: #333;
|
|
||||||
background: #FFFFFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
max-width: 90ex;
|
|
||||||
margin-left: calc(10vw + 20ex);
|
|
||||||
margin-right: 4ex;
|
|
||||||
margin-top: 20px;
|
|
||||||
margin-bottom: 50px;
|
|
||||||
font-family: "Noticia Text", Georgia, serif;
|
|
||||||
line-height: 1.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content>header {
|
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content>header nav {
|
|
||||||
font-family: "Fira Sans", Helvetica, Arial, sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Basic markup elements */
|
|
||||||
|
|
||||||
b, strong {
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
i, em {
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
sup {
|
|
||||||
vertical-align: super;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub {
|
|
||||||
vertical-align: sub;
|
|
||||||
}
|
|
||||||
|
|
||||||
sup, sub {
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: 0;
|
|
||||||
margin-left: 0.2ex;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre {
|
|
||||||
margin-top: 0.8em;
|
|
||||||
margin-bottom: 1.2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
p, ul, ol {
|
|
||||||
margin-top: 0.5em;
|
|
||||||
margin-bottom: 1em;
|
|
||||||
}
|
|
||||||
ul, ol {
|
|
||||||
list-style-position: outside
|
|
||||||
}
|
|
||||||
|
|
||||||
ul>li {
|
|
||||||
margin-left: 22px;
|
|
||||||
}
|
|
||||||
|
|
||||||
ol>li {
|
|
||||||
margin-left: 27.2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
li>*:first-child {
|
|
||||||
margin-top: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Text alignements, this should be forbidden. */
|
|
||||||
|
|
||||||
.left {
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.right {
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.center {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Links and anchors */
|
|
||||||
|
|
||||||
a {
|
|
||||||
text-decoration: none;
|
|
||||||
color: #2C5CBD;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover {
|
|
||||||
box-shadow: 0 1px 0 0 #2C5CBD;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Linked highlight */
|
|
||||||
*:target {
|
|
||||||
background-color: rgba(187,239,253,0.3) !important;
|
|
||||||
box-shadow: 0 0px 0 1px rgba(187,239,253,0.8) !important;
|
|
||||||
border-radius: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
*:hover>a.anchor {
|
|
||||||
visibility: visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.anchor:before {
|
|
||||||
content: "#"
|
|
||||||
}
|
|
||||||
|
|
||||||
a.anchor:hover {
|
|
||||||
box-shadow: none;
|
|
||||||
text-decoration: none;
|
|
||||||
color: #555;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.anchor {
|
|
||||||
visibility: hidden;
|
|
||||||
position: absolute;
|
|
||||||
/* top: 0px; */
|
|
||||||
/* margin-left: -3ex; */
|
|
||||||
margin-left: -1.3em;
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: normal;
|
|
||||||
padding-right: 0.4em;
|
|
||||||
padding-left: 0.4em;
|
|
||||||
/* To remain selectable */
|
|
||||||
color: #d5d5d5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.spec > a.anchor {
|
|
||||||
margin-left: -2.3em;
|
|
||||||
padding-right: 0.9em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xref-unresolved {
|
|
||||||
color: #2C5CBD;
|
|
||||||
}
|
|
||||||
.xref-unresolved:hover {
|
|
||||||
box-shadow: 0 1px 0 0 #CC6666;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Section and document divisions.
|
|
||||||
Until at least 4.03 many of the modules of the stdlib start at .h7,
|
|
||||||
we restart the sequence there like h2 */
|
|
||||||
|
|
||||||
h1, h2, h3, h4, h5, h6, .h7, .h8, .h9, .h10 {
|
|
||||||
font-family: "Fira Sans", Helvetica, Arial, sans-serif;
|
|
||||||
font-weight: 400;
|
|
||||||
margin: 0.5em 0 0.5em 0;
|
|
||||||
padding-top: 0.1em;
|
|
||||||
line-height: 1.2;
|
|
||||||
overflow-wrap: break-word;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 2.441em;
|
|
||||||
margin-top: 1.214em;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 1.953em;
|
|
||||||
box-shadow: 0 1px 0 0 #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
font-size: 1.563em;
|
|
||||||
}
|
|
||||||
|
|
||||||
h3 {
|
|
||||||
font-size: 1.25em;
|
|
||||||
}
|
|
||||||
|
|
||||||
small, .font_small {
|
|
||||||
font-size: 0.8em;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 code, h1 tt {
|
|
||||||
font-size: inherit;
|
|
||||||
font-weight: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 code, h2 tt {
|
|
||||||
font-size: inherit;
|
|
||||||
font-weight: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
h3 code, h3 tt {
|
|
||||||
font-size: inherit;
|
|
||||||
font-weight: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
h3 code, h3 tt {
|
|
||||||
font-size: inherit;
|
|
||||||
font-weight: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
h4 {
|
|
||||||
font-size: 1.12em;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Preformatted and code */
|
|
||||||
|
|
||||||
tt, code, pre {
|
|
||||||
font-family: "Fira Mono", courier;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre {
|
|
||||||
padding: 0.1em;
|
|
||||||
border: 1px solid #eee;
|
|
||||||
border-radius: 5px;
|
|
||||||
overflow-x: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
p code, li code {
|
|
||||||
background-color: #f6f8fa;
|
|
||||||
color: #0d2b3e;
|
|
||||||
border-radius: 3px;
|
|
||||||
padding: 0 0.3ex;
|
|
||||||
}
|
|
||||||
|
|
||||||
p a > code {
|
|
||||||
color: #2C5CBD;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Code blocks (e.g. Examples) */
|
|
||||||
|
|
||||||
pre code {
|
|
||||||
font-size: 0.893rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Code lexemes */
|
|
||||||
|
|
||||||
.keyword {
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Module member specification */
|
|
||||||
|
|
||||||
.spec:not(.include), .spec.include details summary {
|
|
||||||
background-color: #f6f8fa;
|
|
||||||
border-radius: 3px;
|
|
||||||
border-left: 4px solid #5c9cf5;
|
|
||||||
border-right: 5px solid transparent;
|
|
||||||
padding: 0.35em 0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.spec.include details summary:hover {
|
|
||||||
background-color: #ebeff2;
|
|
||||||
}
|
|
||||||
|
|
||||||
dl, div.spec, .doc, aside {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
dl > dd {
|
|
||||||
padding: 0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
dd> :first-child {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
dl:last-child, dd> :last-child, aside:last-child, article:last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
dt+dt {
|
|
||||||
margin-top: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
section+section, section > header + dl {
|
|
||||||
margin-top: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.spec.type .variant {
|
|
||||||
margin-left: 2ch;
|
|
||||||
}
|
|
||||||
.spec.type .variant p {
|
|
||||||
margin: 0;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
.spec.type .record {
|
|
||||||
margin-left: 2ch;
|
|
||||||
}
|
|
||||||
.spec.type .record p {
|
|
||||||
margin: 0;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.def {
|
|
||||||
margin-top: 0;
|
|
||||||
text-indent: -2ex;
|
|
||||||
padding-left: 2ex;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.def+div.doc {
|
|
||||||
margin-left: 1ex;
|
|
||||||
margin-top: 2.5px
|
|
||||||
}
|
|
||||||
|
|
||||||
div.doc>*:first-child {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The elements other than heading should be wrapped in <aside> elements. */
|
|
||||||
/* heading, body>p, body>ul, body>ol, h3, h4, body>pre { */
|
|
||||||
/* margin-bottom: 30px; */
|
|
||||||
/* } */
|
|
||||||
|
|
||||||
/* Collapsible inlined include and module */
|
|
||||||
|
|
||||||
.spec.include details {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.spec.include details:after {
|
|
||||||
z-index: -100;
|
|
||||||
display: block;
|
|
||||||
content: " ";
|
|
||||||
position: absolute;
|
|
||||||
border-radius: 0 1ex 1ex 0;
|
|
||||||
right: -20px;
|
|
||||||
top: 1px;
|
|
||||||
bottom: 1px;
|
|
||||||
width: 15px;
|
|
||||||
background: rgba(0, 4, 15, 0.05);
|
|
||||||
box-shadow: 0 0px 0 1px rgba(204, 204, 204, 0.53);
|
|
||||||
}
|
|
||||||
|
|
||||||
.spec.include details summary {
|
|
||||||
position: relative;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
cursor: pointer;
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FIXME: Does not work in Firefox. */
|
|
||||||
details summary::-webkit-details-marker {
|
|
||||||
color: #888;
|
|
||||||
transform: scaleX(-1);
|
|
||||||
position: absolute;
|
|
||||||
top: calc(50% - 5px);
|
|
||||||
height: 11px;
|
|
||||||
right: -29px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Records and variants FIXME */
|
|
||||||
|
|
||||||
div.def table {
|
|
||||||
text-indent: 0em;
|
|
||||||
padding: 0;
|
|
||||||
margin-left: -2ex;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.def {
|
|
||||||
padding-right: 2ex
|
|
||||||
}
|
|
||||||
|
|
||||||
.record td.def {
|
|
||||||
padding-left: 2ex;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.doc *:first-child {
|
|
||||||
margin-top: 0em
|
|
||||||
}
|
|
||||||
|
|
||||||
/* @ tags */
|
|
||||||
|
|
||||||
ul.at-tag {
|
|
||||||
list-style-type: none;
|
|
||||||
margin-left: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.at-tag li {
|
|
||||||
margin-left: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.at-tag li p:first-child {
|
|
||||||
margin-top: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FIXME remove */
|
|
||||||
|
|
||||||
span.at-tag {
|
|
||||||
font-weight: bold
|
|
||||||
}
|
|
||||||
|
|
||||||
.at-tag.deprecated {
|
|
||||||
font-weight: normal;
|
|
||||||
color: crimson
|
|
||||||
}
|
|
||||||
|
|
||||||
.at-tag.raise {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FIXME random other things to review. */
|
|
||||||
|
|
||||||
.heading {
|
|
||||||
margin-top: 10px;
|
|
||||||
border-bottom: solid;
|
|
||||||
border-width: 1px;
|
|
||||||
border-color: #DDD;
|
|
||||||
text-align: right;
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.heading+.sig {
|
|
||||||
margin-top: -20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.heading+.parameters {
|
|
||||||
margin-top: -20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Odig package index */
|
|
||||||
|
|
||||||
.by-name ol, .by-tag ol, .errors ol {
|
|
||||||
list-style-type: none;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.by-name ol ol, .by-tag ol ol {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
.by-name li, .by-tag li, .errors li {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.by-name .version {
|
|
||||||
font-size: 10px;
|
|
||||||
color: #AAA
|
|
||||||
}
|
|
||||||
|
|
||||||
.by-name nav {
|
|
||||||
margin-bottom: 10px
|
|
||||||
}
|
|
||||||
|
|
||||||
.by-name nav a {
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-size: 18px;
|
|
||||||
margin-right: 1ex;
|
|
||||||
color: #222;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.by-tag nav a {
|
|
||||||
margin-right: 1ex;
|
|
||||||
color: #222;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.by-tag>ol>li {
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.by-tag>ol>li>span, .by-tag>ol>li>ol, .by-tag>ol>li>ol>li {
|
|
||||||
display: inline-block;
|
|
||||||
margin-right: 1ex;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Odig package page */
|
|
||||||
|
|
||||||
.package nav {
|
|
||||||
display: inline;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.package .version {
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1+.modules, h1+.sel {
|
|
||||||
margin-top: 10px
|
|
||||||
}
|
|
||||||
|
|
||||||
.sel {
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: italic;
|
|
||||||
font-size: 14px;
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sel+.modules {
|
|
||||||
margin-top: 10px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
margin-left: 1ex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modules {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modules .module {
|
|
||||||
min-width: 8ex;
|
|
||||||
padding-right: 2ex
|
|
||||||
}
|
|
||||||
|
|
||||||
.package.info {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.package.info td:first-child {
|
|
||||||
font-style: italic;
|
|
||||||
padding-right: 2ex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.package.info ul {
|
|
||||||
list-style-type: none;
|
|
||||||
display: inline;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.package.info li {
|
|
||||||
display: inline-block;
|
|
||||||
margin: 0;
|
|
||||||
margin-right: 1ex;
|
|
||||||
}
|
|
||||||
|
|
||||||
#info-authors li, #info-maintainers li {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Sidebar and TOC */
|
|
||||||
|
|
||||||
.toc:before {
|
|
||||||
display: block;
|
|
||||||
content: "Contents";
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-size: 1em;
|
|
||||||
margin: 1.414em 0 0.5em;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #777;
|
|
||||||
line-height: 1.2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc {
|
|
||||||
position: fixed;
|
|
||||||
top: 0px;
|
|
||||||
bottom: 0px;
|
|
||||||
left: 0px;
|
|
||||||
max-width: 30ex;
|
|
||||||
min-width: 26ex;
|
|
||||||
width: 20%;
|
|
||||||
background: #f6f8fa;
|
|
||||||
overflow: auto;
|
|
||||||
color: #1F2D3D;
|
|
||||||
padding-left: 2ex;
|
|
||||||
padding-right: 2ex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc ul li a {
|
|
||||||
font-family: "Fira Sans", sans-serif;
|
|
||||||
font-size: 0.95em;
|
|
||||||
color: #333;
|
|
||||||
font-weight: 400;
|
|
||||||
line-height: 1.6em;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc ul li a:hover {
|
|
||||||
box-shadow: none;
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* First level titles */
|
|
||||||
|
|
||||||
.toc>ul>li>a {
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc li ul {
|
|
||||||
margin: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc ul {
|
|
||||||
list-style-type: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc ul li {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.toc>ul>li {
|
|
||||||
margin-bottom: 0.3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc ul li li {
|
|
||||||
border-left: 1px solid #ccc;
|
|
||||||
margin-left: 5px;
|
|
||||||
padding-left: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Mobile adjustements. */
|
|
||||||
|
|
||||||
@media only screen and (max-width: 95ex) {
|
|
||||||
.content {
|
|
||||||
margin: auto;
|
|
||||||
padding: 2.0em;
|
|
||||||
}
|
|
||||||
.toc {
|
|
||||||
position: static;
|
|
||||||
width: auto;
|
|
||||||
min-width: unset;
|
|
||||||
max-width: unset;
|
|
||||||
border: none;
|
|
||||||
padding: 0.2em 1em;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Print adjustements. */
|
|
||||||
|
|
||||||
@media print {
|
|
||||||
body {
|
|
||||||
color: black;
|
|
||||||
background: white;
|
|
||||||
}
|
|
||||||
body nav:first-child {
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Syntax highlighting (based on github-gist) */
|
|
||||||
|
|
||||||
.hljs {
|
|
||||||
display: block;
|
|
||||||
background: white;
|
|
||||||
padding: 0.5em;
|
|
||||||
color: #333333;
|
|
||||||
overflow-x: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-comment,
|
|
||||||
.hljs-meta {
|
|
||||||
color: #969896;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-string,
|
|
||||||
.hljs-variable,
|
|
||||||
.hljs-template-variable,
|
|
||||||
.hljs-strong,
|
|
||||||
.hljs-emphasis,
|
|
||||||
.hljs-quote {
|
|
||||||
color: #df5000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-keyword,
|
|
||||||
.hljs-selector-tag {
|
|
||||||
color: #a71d5d;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-type,
|
|
||||||
.hljs-class .hljs-title {
|
|
||||||
color: #458;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-literal,
|
|
||||||
.hljs-symbol,
|
|
||||||
.hljs-bullet,
|
|
||||||
.hljs-attribute {
|
|
||||||
color: #0086b3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-section,
|
|
||||||
.hljs-name {
|
|
||||||
color: #63a35c;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-tag {
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-attr,
|
|
||||||
.hljs-selector-id,
|
|
||||||
.hljs-selector-class,
|
|
||||||
.hljs-selector-attr,
|
|
||||||
.hljs-selector-pseudo {
|
|
||||||
color: #795da3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-addition {
|
|
||||||
color: #55a532;
|
|
||||||
background-color: #eaffea;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-deletion {
|
|
||||||
color: #bd2c00;
|
|
||||||
background-color: #ffecec;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-link {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------
|
|
||||||
Copyright (c) 2016 The odoc contributors
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
|
||||||
purpose with or without fee is hereby granted, provided that the above
|
|
||||||
copyright notice and this permission notice appear in all copies.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
||||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
||||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
||||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
---------------------------------------------------------------------------*/
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO_BACKEND (tiny_httpd.Tiny_httpd.IO_BACKEND)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../../index.html">tiny_httpd</a> » <a href="../index.html">Tiny_httpd</a> » IO_BACKEND</nav><h1>Module type <code>Tiny_httpd.IO_BACKEND</code></h1></header><dl><dt class="spec value" id="val-init_addr"><a href="#val-init_addr" class="anchor"></a><code><span class="keyword">val</span> init_addr : unit <span>-></span> string</code></dt><dt class="spec value" id="val-init_port"><a href="#val-init_port" class="anchor"></a><code><span class="keyword">val</span> init_port : unit <span>-></span> int</code></dt><dt class="spec value" id="val-get_time_s"><a href="#val-get_time_s" class="anchor"></a><code><span class="keyword">val</span> get_time_s : unit <span>-></span> float</code></dt><dt class="spec value" id="val-tcp_server"><a href="#val-tcp_server" class="anchor"></a><code><span class="keyword">val</span> tcp_server : unit <span>-></span> <a href="../../Tiny_httpd_io/TCP_server/index.html#type-builder">Tiny_httpd_io.TCP_server.builder</a></code></dt></dl></div></body></html>
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>SERVER_SENT_GENERATOR (tiny_httpd.Tiny_httpd.SERVER_SENT_GENERATOR)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../../index.html">tiny_httpd</a> » <a href="../index.html">Tiny_httpd</a> » SERVER_SENT_GENERATOR</nav><h1>Module type <code>Tiny_httpd.SERVER_SENT_GENERATOR</code></h1></header><dl><dt class="spec value" id="val-set_headers"><a href="#val-set_headers" class="anchor"></a><code><span class="keyword">val</span> set_headers : <a href="../../Tiny_httpd_server/Headers/index.html#type-t">Headers.t</a> <span>-></span> unit</code></dt><dt class="spec value" id="val-send_event"><a href="#val-send_event" class="anchor"></a><code><span class="keyword">val</span> send_event : <span>?⁠event:string</span> <span>-></span> <span>?⁠id:string</span> <span>-></span> <span>?⁠retry:string</span> <span>-></span> <span>data:string</span> <span>-></span> unit <span>-></span> unit</code></dt><dt class="spec value" id="val-close"><a href="#val-close" class="anchor"></a><code><span class="keyword">val</span> close : unit <span>-></span> unit</code></dt></dl></div></body></html>
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Tiny_httpd_atomic_ (tiny_httpd.Tiny_httpd_atomic_)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../index.html">tiny_httpd</a> » Tiny_httpd_atomic_</nav><h1>Module <code>Tiny_httpd_atomic_</code></h1></header><div><div class="spec include"><div class="doc"><details open="open"><summary><span class="def"><code><span class="keyword">include</span> Stdlib.Atomic</code></span></summary><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> <span>!'a t</span></code><code> = <span><span class="type-var">'a</span> Stdlib__atomic.t</span></code></dt></dl><dl><dt class="spec value" id="val-make"><a href="#val-make" class="anchor"></a><code><span class="keyword">val</span> make : <span class="type-var">'a</span> <span>-></span> <span><span class="type-var">'a</span> <a href="index.html#type-t">t</a></span></code></dt><dt class="spec value" id="val-get"><a href="#val-get" class="anchor"></a><code><span class="keyword">val</span> get : <span><span class="type-var">'a</span> <a href="index.html#type-t">t</a></span> <span>-></span> <span class="type-var">'a</span></code></dt><dt class="spec value" id="val-set"><a href="#val-set" class="anchor"></a><code><span class="keyword">val</span> set : <span><span class="type-var">'a</span> <a href="index.html#type-t">t</a></span> <span>-></span> <span class="type-var">'a</span> <span>-></span> unit</code></dt><dt class="spec value" id="val-exchange"><a href="#val-exchange" class="anchor"></a><code><span class="keyword">val</span> exchange : <span><span class="type-var">'a</span> <a href="index.html#type-t">t</a></span> <span>-></span> <span class="type-var">'a</span> <span>-></span> <span class="type-var">'a</span></code></dt><dt class="spec value" id="val-compare_and_set"><a href="#val-compare_and_set" class="anchor"></a><code><span class="keyword">val</span> compare_and_set : <span><span class="type-var">'a</span> <a href="index.html#type-t">t</a></span> <span>-></span> <span class="type-var">'a</span> <span>-></span> <span class="type-var">'a</span> <span>-></span> bool</code></dt><dt class="spec value" id="val-fetch_and_add"><a href="#val-fetch_and_add" class="anchor"></a><code><span class="keyword">val</span> fetch_and_add : <span>int <a href="index.html#type-t">t</a></span> <span>-></span> int <span>-></span> int</code></dt><dt class="spec value" id="val-incr"><a href="#val-incr" class="anchor"></a><code><span class="keyword">val</span> incr : <span>int <a href="index.html#type-t">t</a></span> <span>-></span> unit</code></dt><dt class="spec value" id="val-decr"><a href="#val-decr" class="anchor"></a><code><span class="keyword">val</span> decr : <span>int <a href="index.html#type-t">t</a></span> <span>-></span> unit</code></dt></dl></details></div></div></div></div></body></html>
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Tiny_httpd_buf (tiny_httpd.Tiny_httpd_buf)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../index.html">tiny_httpd</a> » Tiny_httpd_buf</nav><h1>Module <code>Tiny_httpd_buf</code></h1><p>Simple buffer.</p><p>These buffers are used to avoid allocating too many byte arrays when processing streams and parsing requests.</p><dl><dt>since</dt><dd>0.12</dd></dl></header><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code></dt></dl><dl><dt class="spec value" id="val-size"><a href="#val-size" class="anchor"></a><code><span class="keyword">val</span> size : <a href="index.html#type-t">t</a> <span>-></span> int</code></dt><dt class="spec value" id="val-clear"><a href="#val-clear" class="anchor"></a><code><span class="keyword">val</span> clear : <a href="index.html#type-t">t</a> <span>-></span> unit</code></dt><dt class="spec value" id="val-create"><a href="#val-create" class="anchor"></a><code><span class="keyword">val</span> create : <span>?⁠size:int</span> <span>-></span> unit <span>-></span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-contents"><a href="#val-contents" class="anchor"></a><code><span class="keyword">val</span> contents : <a href="index.html#type-t">t</a> <span>-></span> string</code></dt><dt class="spec value" id="val-bytes_slice"><a href="#val-bytes_slice" class="anchor"></a><code><span class="keyword">val</span> bytes_slice : <a href="index.html#type-t">t</a> <span>-></span> bytes</code></dt><dd><p>Access underlying slice of bytes.</p><dl><dt>since</dt><dd>0.5</dd></dl></dd></dl><dl><dt class="spec value" id="val-contents_and_clear"><a href="#val-contents_and_clear" class="anchor"></a><code><span class="keyword">val</span> contents_and_clear : <a href="index.html#type-t">t</a> <span>-></span> string</code></dt><dd><p>Get contents of the buffer and clear it.</p><dl><dt>since</dt><dd>0.5</dd></dl></dd></dl><dl><dt class="spec value" id="val-add_char"><a href="#val-add_char" class="anchor"></a><code><span class="keyword">val</span> add_char : <a href="index.html#type-t">t</a> <span>-></span> char <span>-></span> unit</code></dt><dd><p>Add a single char.</p><dl><dt>since</dt><dd>0.14</dd></dl></dd></dl><dl><dt class="spec value" id="val-add_bytes"><a href="#val-add_bytes" class="anchor"></a><code><span class="keyword">val</span> add_bytes : <a href="index.html#type-t">t</a> <span>-></span> bytes <span>-></span> int <span>-></span> int <span>-></span> unit</code></dt><dd><p>Append given bytes slice to the buffer.</p><dl><dt>since</dt><dd>0.5</dd></dl></dd></dl><dl><dt class="spec value" id="val-add_string"><a href="#val-add_string" class="anchor"></a><code><span class="keyword">val</span> add_string : <a href="index.html#type-t">t</a> <span>-></span> string <span>-></span> unit</code></dt><dd><p>Add string.</p><dl><dt>since</dt><dd>0.14</dd></dl></dd></dl><dl><dt class="spec value" id="val-add_buffer"><a href="#val-add_buffer" class="anchor"></a><code><span class="keyword">val</span> add_buffer : <a href="index.html#type-t">t</a> <span>-></span> Stdlib.Buffer.t <span>-></span> unit</code></dt><dd><p>Append bytes from buffer.</p><dl><dt>since</dt><dd>0.14</dd></dl></dd></dl></div></body></html>
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Embedded_fs (tiny_httpd.Tiny_httpd_dir.Embedded_fs)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../../index.html">tiny_httpd</a> » <a href="../index.html">Tiny_httpd_dir</a> » Embedded_fs</nav><h1>Module <code>Tiny_httpd_dir.Embedded_fs</code></h1><p>An 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.</p><dl><dt>since</dt><dd>0.12</dd></dl></header><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code></dt><dd><p>The pseudo-filesystem</p></dd></dl><dl><dt class="spec value" id="val-create"><a href="#val-create" class="anchor"></a><code><span class="keyword">val</span> create : <span>?⁠mtime:float</span> <span>-></span> unit <span>-></span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-add_file"><a href="#val-add_file" class="anchor"></a><code><span class="keyword">val</span> add_file : <span>?⁠mtime:float</span> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <span>path:string</span> <span>-></span> string <span>-></span> unit</code></dt><dd><p>Add file to the virtual file system.</p><dl><dt>raises Invalid_argument</dt><dd><p>if the path contains '..' or if it tries to make a directory out of an existing path that is a file.</p></dd></dl></dd></dl><dl><dt class="spec value" id="val-to_vfs"><a href="#val-to_vfs" class="anchor"></a><code><span class="keyword">val</span> to_vfs : <a href="index.html#type-t">t</a> <span>-></span> <span>(<span class="keyword">module</span> <a href="../module-type-VFS/index.html">VFS</a>)</span></code></dt></dl></div></body></html>
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>VFS (tiny_httpd.Tiny_httpd_dir.VFS)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../../index.html">tiny_httpd</a> » <a href="../index.html">Tiny_httpd_dir</a> » VFS</nav><h1>Module type <code>Tiny_httpd_dir.VFS</code></h1><p>Virtual file system.</p><p>This is used to emulate a file system from pure OCaml functions and data, e.g. for resources bundled inside the web server.</p><dl><dt>since</dt><dd>0.12</dd></dl></header><dl><dt class="spec value" id="val-descr"><a href="#val-descr" class="anchor"></a><code><span class="keyword">val</span> descr : string</code></dt><dd><p>Description of the VFS</p></dd></dl><dl><dt class="spec value" id="val-is_directory"><a href="#val-is_directory" class="anchor"></a><code><span class="keyword">val</span> is_directory : string <span>-></span> bool</code></dt><dt class="spec value" id="val-contains"><a href="#val-contains" class="anchor"></a><code><span class="keyword">val</span> contains : string <span>-></span> bool</code></dt><dd><p><code>file_exists vfs path</code> returns <code>true</code> if <code>path</code> points to a file or directory inside <code>vfs</code>.</p></dd></dl><dl><dt class="spec value" id="val-list_dir"><a href="#val-list_dir" class="anchor"></a><code><span class="keyword">val</span> list_dir : string <span>-></span> <span>string array</span></code></dt><dd><p>List directory. This only returns basenames, the files need to be put in the directory path using <span class="xref-unresolved" title="unresolved reference to "Filename.concat""><code>Filename</code>.concat</span>.</p></dd></dl><dl><dt class="spec value" id="val-delete"><a href="#val-delete" class="anchor"></a><code><span class="keyword">val</span> delete : string <span>-></span> unit</code></dt><dd><p>Delete path</p></dd></dl><dl><dt class="spec value" id="val-create"><a href="#val-create" class="anchor"></a><code><span class="keyword">val</span> create : string <span>-></span> <span>(bytes <span>-></span> int <span>-></span> int <span>-></span> unit)</span> * <span>(unit <span>-></span> unit)</span></code></dt><dd><p>Create a file and obtain a pair <code>write, close</code></p></dd></dl><dl><dt class="spec value" id="val-read_file_content"><a href="#val-read_file_content" class="anchor"></a><code><span class="keyword">val</span> read_file_content : string <span>-></span> <a href="../../Tiny_httpd_stream/index.html#type-t">Tiny_httpd_stream.t</a></code></dt><dd><p>Read content of a file</p></dd></dl><dl><dt class="spec value" id="val-file_size"><a href="#val-file_size" class="anchor"></a><code><span class="keyword">val</span> file_size : string <span>-></span> <span>int option</span></code></dt><dd><p>File size, e.g. using "stat"</p></dd></dl><dl><dt class="spec value" id="val-file_mtime"><a href="#val-file_mtime" class="anchor"></a><code><span class="keyword">val</span> file_mtime : string <span>-></span> <span>float option</span></code></dt><dd><p>File modification time, e.g. using "stat"</p></dd></dl></div></body></html>
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Out (tiny_httpd.Tiny_httpd_html_.Out)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../../index.html">tiny_httpd</a> » <a href="../index.html">Tiny_httpd_html_</a> » Out</nav><h1>Module <code>Tiny_httpd_html_.Out</code></h1><p>Output for HTML combinators.</p><p>This output type is used to produce a string reasonably efficiently from a tree of combinators.</p><p><b>NOTE</b>: this is experimental and an unstable API.</p><dl><dt>since</dt><dd>0.12</dd></dl></header><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code></dt></dl><dl><dt class="spec value" id="val-create_of_buffer"><a href="#val-create_of_buffer" class="anchor"></a><code><span class="keyword">val</span> create_of_buffer : Stdlib.Buffer.t <span>-></span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-create_of_out"><a href="#val-create_of_out" class="anchor"></a><code><span class="keyword">val</span> create_of_out : <a href="../../Tiny_httpd_io/Output/index.html#type-t">Tiny_httpd_io.Output.t</a> <span>-></span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-flush"><a href="#val-flush" class="anchor"></a><code><span class="keyword">val</span> flush : <a href="index.html#type-t">t</a> <span>-></span> unit</code></dt><dt class="spec value" id="val-add_char"><a href="#val-add_char" class="anchor"></a><code><span class="keyword">val</span> add_char : <a href="index.html#type-t">t</a> <span>-></span> char <span>-></span> unit</code></dt><dt class="spec value" id="val-add_string"><a href="#val-add_string" class="anchor"></a><code><span class="keyword">val</span> add_string : <a href="index.html#type-t">t</a> <span>-></span> string <span>-></span> unit</code></dt><dt class="spec value" id="val-add_format_nl"><a href="#val-add_format_nl" class="anchor"></a><code><span class="keyword">val</span> add_format_nl : <a href="index.html#type-t">t</a> <span>-></span> unit</code></dt><dt class="spec value" id="val-with_no_format_nl"><a href="#val-with_no_format_nl" class="anchor"></a><code><span class="keyword">val</span> with_no_format_nl : <a href="index.html#type-t">t</a> <span>-></span> <span>(unit <span>-></span> <span class="type-var">'a</span>)</span> <span>-></span> <span class="type-var">'a</span></code></dt></dl></div></body></html>
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Input (tiny_httpd.Tiny_httpd_io.Input)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../../index.html">tiny_httpd</a> » <a href="../index.html">Tiny_httpd_io</a> » Input</nav><h1>Module <code>Tiny_httpd_io.Input</code></h1><p>Input channel (byte source)</p></header><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code><code> = </code><code>{</code><table class="record"><tr id="type-t.input" class="anchored"><td class="def field"><a href="#type-t.input" class="anchor"></a><code>input : bytes <span>-></span> int <span>-></span> int <span>-></span> int;</code></td><td class="doc"><p>Read into the slice. Returns <code>0</code> only if the channel is closed.</p></td></tr><tr id="type-t.close" class="anchored"><td class="def field"><a href="#type-t.close" class="anchor"></a><code>close : unit <span>-></span> unit;</code></td><td class="doc"><p>Close the input. Must be idempotent.</p></td></tr></table><code>}</code></dt><dd><p>An input channel, i.e an incoming stream of bytes.</p><p>This can be a <code>string</code>, an <code>int_channel</code>, an <code>Unix.file_descr</code>, a decompression wrapper around another input channel, etc.</p></dd></dl><dl><dt class="spec value" id="val-of_in_channel"><a href="#val-of_in_channel" class="anchor"></a><code><span class="keyword">val</span> of_in_channel : <span>?⁠close_noerr:bool</span> <span>-></span> Stdlib.in_channel <span>-></span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-of_unix_fd"><a href="#val-of_unix_fd" class="anchor"></a><code><span class="keyword">val</span> of_unix_fd : <span>?⁠close_noerr:bool</span> <span>-></span> Unix.file_descr <span>-></span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-input"><a href="#val-input" class="anchor"></a><code><span class="keyword">val</span> input : <a href="index.html#type-t">t</a> <span>-></span> bytes <span>-></span> int <span>-></span> int <span>-></span> int</code></dt><dd><p>Read into the given slice.</p><dl><dt>returns</dt><dd><p>the number of bytes read, <code>0</code> means end of input.</p></dd></dl></dd></dl><dl><dt class="spec value" id="val-close"><a href="#val-close" class="anchor"></a><code><span class="keyword">val</span> close : <a href="index.html#type-t">t</a> <span>-></span> unit</code></dt><dd><p>Close the channel.</p></dd></dl></div></body></html>
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>TCP_server (tiny_httpd.Tiny_httpd_io.TCP_server)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../../index.html">tiny_httpd</a> » <a href="../index.html">Tiny_httpd_io</a> » TCP_server</nav><h1>Module <code>Tiny_httpd_io.TCP_server</code></h1><p>A TCP server abstraction.</p></header><dl><dt class="spec type" id="type-conn_handler"><a href="#type-conn_handler" class="anchor"></a><code><span class="keyword">type</span> conn_handler</code><code> = </code><code>{</code><table class="record"><tr id="type-conn_handler.handle" class="anchored"><td class="def field"><a href="#type-conn_handler.handle" class="anchor"></a><code>handle : <span>client_addr:Unix.sockaddr</span> <span>-></span> <a href="../Input/index.html#type-t">Input.t</a> <span>-></span> <a href="../Output/index.html#type-t">Output.t</a> <span>-></span> unit;</code></td><td class="doc"><p>Handle client connection</p></td></tr></table><code>}</code></dt><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code><code> = </code><code>{</code><table class="record"><tr id="type-t.endpoint" class="anchored"><td class="def field"><a href="#type-t.endpoint" class="anchor"></a><code>endpoint : unit <span>-></span> string * int;</code></td><td class="doc"><p>Endpoint we listen on. This can only be called from within <code>serve</code>.</p></td></tr><tr id="type-t.active_connections" class="anchored"><td class="def field"><a href="#type-t.active_connections" class="anchor"></a><code>active_connections : unit <span>-></span> int;</code></td><td class="doc"><p>Number of connections currently active</p></td></tr><tr id="type-t.running" class="anchored"><td class="def field"><a href="#type-t.running" class="anchor"></a><code>running : unit <span>-></span> bool;</code></td><td class="doc"><p>Is the server currently running?</p></td></tr><tr id="type-t.stop" class="anchored"><td class="def field"><a href="#type-t.stop" class="anchor"></a><code>stop : unit <span>-></span> unit;</code></td><td class="doc"><p>Ask the server to stop. This might not take effect immediately, and is idempotent. After this <code>server.running()</code> must return <code>false</code>.</p></td></tr></table><code>}</code></dt><dd><p>A running TCP server.</p><p>This contains some functions that provide information about the running server, including whether it's active (as opposed to stopped), a function to stop it, and statistics about the number of connections.</p></dd></dl><dl><dt class="spec type" id="type-builder"><a href="#type-builder" class="anchor"></a><code><span class="keyword">type</span> builder</code><code> = </code><code>{</code><table class="record"><tr id="type-builder.serve" class="anchored"><td class="def field"><a href="#type-builder.serve" class="anchor"></a><code>serve : <span>after_init:<span>(<a href="index.html#type-t">t</a> <span>-></span> unit)</span></span> <span>-></span> <span>handle:<a href="index.html#type-conn_handler">conn_handler</a></span> <span>-></span> unit <span>-></span> unit;</code></td><td class="doc"><p>Blocking call to listen for incoming connections and handle them. Uses the connection handler <code>handle</code> to handle individual client connections in individual threads/fibers/tasks.</p><dl><dt>parameter after_init</dt><dd><p>is called once with the server after the server has started.</p></dd></dl></td></tr></table><code>}</code></dt><dd><p>A TCP server builder implementation.</p><p>Calling <code>builder.serve ~after_init ~handle ()</code> starts a new TCP server on an unspecified endpoint (most likely coming from the function returning this builder) and returns the running server.</p></dd></dl></div></body></html>
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Writer (tiny_httpd.Tiny_httpd_io.Writer)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../../index.html">tiny_httpd</a> » <a href="../index.html">Tiny_httpd_io</a> » Writer</nav><h1>Module <code>Tiny_httpd_io.Writer</code></h1><p>A writer abstraction.</p></header><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code><code> = </code><code>{</code><table class="record"><tr id="type-t.write" class="anchored"><td class="def field"><a href="#type-t.write" class="anchor"></a><code>write : <a href="../Output/index.html#type-t">Output.t</a> <span>-></span> unit;</code></td></tr></table><code>}</code></dt><dd><p>Writer.</p><p>A writer is a push-based stream of bytes. Give it an output channel and it will write the bytes in it.</p><p>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 <code>out_channel</code>, including controlling calls to <code>flush</code>.</p><dl><dt>since</dt><dd>0.14</dd></dl></dd></dl><dl><dt class="spec value" id="val-make"><a href="#val-make" class="anchor"></a><code><span class="keyword">val</span> make : <span>write:<span>(<a href="../Output/index.html#type-t">Output.t</a> <span>-></span> unit)</span></span> <span>-></span> unit <span>-></span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-write"><a href="#val-write" class="anchor"></a><code><span class="keyword">val</span> write : <a href="../Output/index.html#type-t">Output.t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> unit</code></dt><dd><p>Write into the channel.</p></dd></dl><dl><dt class="spec value" id="val-empty"><a href="#val-empty" class="anchor"></a><code><span class="keyword">val</span> empty : <a href="index.html#type-t">t</a></code></dt><dd><p>Empty writer, will output 0 bytes.</p></dd></dl><dl><dt class="spec value" id="val-of_string"><a href="#val-of_string" class="anchor"></a><code><span class="keyword">val</span> of_string : string <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p>A writer that just emits the bytes from the given string.</p></dd></dl></div></body></html>
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Tiny_httpd_io (tiny_httpd.Tiny_httpd_io)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../index.html">tiny_httpd</a> » Tiny_httpd_io</nav><h1>Module <code>Tiny_httpd_io</code></h1><p>IO abstraction.</p><p>We abstract IO so we can support classic unix blocking IOs with threads, and modern async IO with Eio.</p><p><b>NOTE</b>: experimental.</p><dl><dt>since</dt><dd>0.14</dd></dl></header><div class="spec module" id="module-Buf"><a href="#module-Buf" class="anchor"></a><code><span class="keyword">module</span> Buf = <a href="../Tiny_httpd_buf/index.html">Tiny_httpd_buf</a></code></div><dl><dt class="spec module" id="module-Input"><a href="#module-Input" class="anchor"></a><code><span class="keyword">module</span> <a href="Input/index.html">Input</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></dt><dd><p>Input channel (byte source)</p></dd></dl><dl><dt class="spec module" id="module-Output"><a href="#module-Output" class="anchor"></a><code><span class="keyword">module</span> <a href="Output/index.html">Output</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></dt><dd><p>Output channel (byte sink)</p></dd></dl><dl><dt class="spec module" id="module-Writer"><a href="#module-Writer" class="anchor"></a><code><span class="keyword">module</span> <a href="Writer/index.html">Writer</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></dt><dd><p>A writer abstraction.</p></dd></dl><dl><dt class="spec module" id="module-TCP_server"><a href="#module-TCP_server" class="anchor"></a><code><span class="keyword">module</span> <a href="TCP_server/index.html">TCP_server</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></dt><dd><p>A TCP server abstraction.</p></dd></dl></div></body></html>
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Tiny_httpd_pool (tiny_httpd.Tiny_httpd_pool)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../index.html">tiny_httpd</a> » Tiny_httpd_pool</nav><h1>Module <code>Tiny_httpd_pool</code></h1><p>Resource pool.</p><p>This pool is used for buffers. It can be used for other resources but do note that it assumes resources are still reasonably cheap to produce and discard, and will never block waiting for a resource — it's not a good pool for DB connections.</p><dl><dt>since</dt><dd>0.14.</dd></dl></header><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> <span>'a t</span></code></dt><dd><p>Pool of values of type <code>'a</code></p></dd></dl><dl><dt class="spec value" id="val-create"><a href="#val-create" class="anchor"></a><code><span class="keyword">val</span> create : <span>?⁠clear:<span>(<span class="type-var">'a</span> <span>-></span> unit)</span></span> <span>-></span> <span>mk_item:<span>(unit <span>-></span> <span class="type-var">'a</span>)</span></span> <span>-></span> <span>?⁠max_size:int</span> <span>-></span> unit <span>-></span> <span><span class="type-var">'a</span> <a href="index.html#type-t">t</a></span></code></dt><dd><p>Create a new pool.</p><dl><dt>parameter mk_item</dt><dd><p>produce a new item in case the pool is empty</p></dd></dl><dl><dt>parameter max_size</dt><dd><p>maximum number of item in the pool before we start dropping resources on the floor. This controls resource consumption.</p></dd></dl><dl><dt>parameter clear</dt><dd><p>a function called on items before recycling them.</p></dd></dl></dd></dl><dl><dt class="spec value" id="val-with_resource"><a href="#val-with_resource" class="anchor"></a><code><span class="keyword">val</span> with_resource : <span><span class="type-var">'a</span> <a href="index.html#type-t">t</a></span> <span>-></span> <span>(<span class="type-var">'a</span> <span>-></span> <span class="type-var">'b</span>)</span> <span>-></span> <span class="type-var">'b</span></code></dt><dd><p><code>with_resource pool f</code> runs <code>f x</code> with <code>x</code> a resource; when <code>f</code> fails or returns, <code>x</code> is returned to the pool for future reuse.</p></dd></dl></div></body></html>
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Headers (tiny_httpd.Tiny_httpd_server.Headers)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../../index.html">tiny_httpd</a> » <a href="../index.html">Tiny_httpd_server</a> » Headers</nav><h1>Module <code>Tiny_httpd_server.Headers</code></h1></header><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code><code> = <span><span>(string * string)</span> list</span></code></dt><dd><p>The header files of a request or response.</p><p>Neither the key nor the value can contain <code>'\r'</code> or <code>'\n'</code>. See https://tools.ietf.org/html/rfc7230#section-3.2</p></dd></dl><dl><dt class="spec value" id="val-empty"><a href="#val-empty" class="anchor"></a><code><span class="keyword">val</span> empty : <a href="index.html#type-t">t</a></code></dt><dd><p>Empty list of headers.</p><dl><dt>since</dt><dd>0.5</dd></dl></dd></dl><dl><dt class="spec value" id="val-get"><a href="#val-get" class="anchor"></a><code><span class="keyword">val</span> get : <span>?⁠f:<span>(string <span>-></span> string)</span></span> <span>-></span> string <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <span>string option</span></code></dt><dd><p><code>get k headers</code> looks for the header field with key <code>k</code>.</p><dl><dt>parameter f</dt><dd><p>if provided, will transform the value before it is returned.</p></dd></dl></dd></dl><dl><dt class="spec value" id="val-set"><a href="#val-set" class="anchor"></a><code><span class="keyword">val</span> set : string <span>-></span> string <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>set k v headers</code> sets the key <code>k</code> to value <code>v</code>. It erases any previous entry for <code>k</code></p></dd></dl><dl><dt class="spec value" id="val-remove"><a href="#val-remove" class="anchor"></a><code><span class="keyword">val</span> remove : string <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p>Remove the key from the headers, if present.</p></dd></dl><dl><dt class="spec value" id="val-contains"><a href="#val-contains" class="anchor"></a><code><span class="keyword">val</span> contains : string <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> bool</code></dt><dd><p>Is there a header with the given key?</p></dd></dl><dl><dt class="spec value" id="val-pp"><a href="#val-pp" class="anchor"></a><code><span class="keyword">val</span> pp : Stdlib.Format.formatter <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> unit</code></dt><dd><p>Pretty print the headers.</p></dd></dl></div></body></html>
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Meth (tiny_httpd.Tiny_httpd_server.Meth)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../../index.html">tiny_httpd</a> » <a href="../index.html">Tiny_httpd_server</a> » Meth</nav><h1>Module <code>Tiny_httpd_server.Meth</code></h1></header><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code> = <code>[ </code><table class="variant"><tr id="type-t.GET" class="anchored"><td class="def constructor"><a href="#type-t.GET" class="anchor"></a><code>| </code><code>`GET</code></td></tr><tr id="type-t.PUT" class="anchored"><td class="def constructor"><a href="#type-t.PUT" class="anchor"></a><code>| </code><code>`PUT</code></td></tr><tr id="type-t.POST" class="anchored"><td class="def constructor"><a href="#type-t.POST" class="anchor"></a><code>| </code><code>`POST</code></td></tr><tr id="type-t.HEAD" class="anchored"><td class="def constructor"><a href="#type-t.HEAD" class="anchor"></a><code>| </code><code>`HEAD</code></td></tr><tr id="type-t.DELETE" class="anchored"><td class="def constructor"><a href="#type-t.DELETE" class="anchor"></a><code>| </code><code>`DELETE</code></td></tr><tr id="type-t.OPTIONS" class="anchored"><td class="def constructor"><a href="#type-t.OPTIONS" class="anchor"></a><code>| </code><code>`OPTIONS</code></td></tr></table><code> ]</code></dt><dd><p>A HTTP method. For now we only handle a subset of these.</p><p>See https://tools.ietf.org/html/rfc7231#section-4</p></dd></dl><dl><dt class="spec value" id="val-pp"><a href="#val-pp" class="anchor"></a><code><span class="keyword">val</span> pp : Stdlib.Format.formatter <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> unit</code></dt><dt class="spec value" id="val-to_string"><a href="#val-to_string" class="anchor"></a><code><span class="keyword">val</span> to_string : <a href="index.html#type-t">t</a> <span>-></span> string</code></dt></dl></div></body></html>
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Middleware (tiny_httpd.Tiny_httpd_server.Middleware)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../../index.html">tiny_httpd</a> » <a href="../index.html">Tiny_httpd_server</a> » Middleware</nav><h1>Module <code>Tiny_httpd_server.Middleware</code></h1></header><dl><dt class="spec type" id="type-handler"><a href="#type-handler" class="anchor"></a><code><span class="keyword">type</span> handler</code><code> = <span><a href="../index.html#type-byte_stream">byte_stream</a> <a href="../Request/index.html#type-t">Request.t</a></span> <span>-></span> <span>resp:<span>(<a href="../Response/index.html#type-t">Response.t</a> <span>-></span> unit)</span></span> <span>-></span> unit</code></dt><dd><p>Handlers are functions returning a response to a request. The response can be delayed, hence the use of a continuation as the <code>resp</code> parameter.</p></dd></dl><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code><code> = <a href="index.html#type-handler">handler</a> <span>-></span> <a href="index.html#type-handler">handler</a></code></dt><dd><p>A middleware is a handler transformation.</p><p>It takes the existing handler <code>h</code>, and returns a new one which, given a query, modify it or log it before passing it to <code>h</code>, or fail. It can also log or modify or drop the response.</p></dd></dl><dl><dt class="spec value" id="val-nil"><a href="#val-nil" class="anchor"></a><code><span class="keyword">val</span> nil : <a href="index.html#type-t">t</a></code></dt><dd><p>Trivial middleware that does nothing.</p></dd></dl></div></body></html>
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Response_code (tiny_httpd.Tiny_httpd_server.Response_code)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../../index.html">tiny_httpd</a> » <a href="../index.html">Tiny_httpd_server</a> » Response_code</nav><h1>Module <code>Tiny_httpd_server.Response_code</code></h1></header><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code><code> = int</code></dt><dd><p>A standard HTTP code.</p><p>https://tools.ietf.org/html/rfc7231#section-6</p></dd></dl><dl><dt class="spec value" id="val-ok"><a href="#val-ok" class="anchor"></a><code><span class="keyword">val</span> ok : <a href="index.html#type-t">t</a></code></dt><dd><p>The code <code>200</code></p></dd></dl><dl><dt class="spec value" id="val-not_found"><a href="#val-not_found" class="anchor"></a><code><span class="keyword">val</span> not_found : <a href="index.html#type-t">t</a></code></dt><dd><p>The code <code>404</code></p></dd></dl><dl><dt class="spec value" id="val-descr"><a href="#val-descr" class="anchor"></a><code><span class="keyword">val</span> descr : <a href="index.html#type-t">t</a> <span>-></span> string</code></dt><dd><p>A description of some of the error codes. NOTE: this is not complete (yet).</p></dd></dl></div></body></html>
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO_BACKEND (tiny_httpd.Tiny_httpd_server.IO_BACKEND)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../../index.html">tiny_httpd</a> » <a href="../index.html">Tiny_httpd_server</a> » IO_BACKEND</nav><h1>Module type <code>Tiny_httpd_server.IO_BACKEND</code></h1><p>A backend that provides IO operations, network operations, etc.</p><p>This is used to decouple tiny_httpd from the scheduler/IO library used to actually open a TCP server and talk to clients. The classic way is based on <code>Unix</code> and blocking IOs, but it's also possible to use an OCaml 5 library using effects and non blocking IOs.</p></header><dl><dt class="spec value" id="val-init_addr"><a href="#val-init_addr" class="anchor"></a><code><span class="keyword">val</span> init_addr : unit <span>-></span> string</code></dt><dd><p>Initial TCP address</p></dd></dl><dl><dt class="spec value" id="val-init_port"><a href="#val-init_port" class="anchor"></a><code><span class="keyword">val</span> init_port : unit <span>-></span> int</code></dt><dd><p>Initial port</p></dd></dl><dl><dt class="spec value" id="val-get_time_s"><a href="#val-get_time_s" class="anchor"></a><code><span class="keyword">val</span> get_time_s : unit <span>-></span> float</code></dt><dd><p>Obtain the current timestamp in seconds.</p></dd></dl><dl><dt class="spec value" id="val-tcp_server"><a href="#val-tcp_server" class="anchor"></a><code><span class="keyword">val</span> tcp_server : unit <span>-></span> <a href="../../Tiny_httpd_io/TCP_server/index.html#type-builder">Tiny_httpd_io.TCP_server.builder</a></code></dt><dd><p>TCP server builder, to create servers that can listen on a port and handle clients.</p></dd></dl></div></body></html>
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>SERVER_SENT_GENERATOR (tiny_httpd.Tiny_httpd_server.SERVER_SENT_GENERATOR)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../../index.html">tiny_httpd</a> » <a href="../index.html">Tiny_httpd_server</a> » SERVER_SENT_GENERATOR</nav><h1>Module type <code>Tiny_httpd_server.SERVER_SENT_GENERATOR</code></h1><p>A server-side function to generate of Server-sent events.</p><p>See <a href="https://html.spec.whatwg.org/multipage/server-sent-events.html">the w3c page</a> and <a href="https://jvns.ca/blog/2021/01/12/day-36--server-sent-events-are-cool--and-a-fun-bug/">this blog post</a>.</p><dl><dt>since</dt><dd>0.9</dd></dl></header><dl><dt class="spec value" id="val-set_headers"><a href="#val-set_headers" class="anchor"></a><code><span class="keyword">val</span> set_headers : <a href="../Headers/index.html#type-t">Headers.t</a> <span>-></span> unit</code></dt><dd><p>Set headers of the response. This is not mandatory but if used at all, it must be called before any call to <a href="index.html#val-send_event"><code>send_event</code></a> (once events are sent the response is already sent too).</p></dd></dl><dl><dt class="spec value" id="val-send_event"><a href="#val-send_event" class="anchor"></a><code><span class="keyword">val</span> send_event : <span>?⁠event:string</span> <span>-></span> <span>?⁠id:string</span> <span>-></span> <span>?⁠retry:string</span> <span>-></span> <span>data:string</span> <span>-></span> unit <span>-></span> unit</code></dt><dd><p>Send an event from the server. If data is a multiline string, it will be sent on separate "data:" lines.</p></dd></dl><dl><dt class="spec value" id="val-close"><a href="#val-close" class="anchor"></a><code><span class="keyword">val</span> close : unit <span>-></span> unit</code></dt><dd><p>Close connection.</p><dl><dt>since</dt><dd>0.11</dd></dl></dd></dl></div></body></html>
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Tiny_httpd_util (tiny_httpd.Tiny_httpd_util)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../index.html">tiny_httpd</a> » Tiny_httpd_util</nav><h1>Module <code>Tiny_httpd_util</code></h1><h2 id="some-utils-for-writing-web-servers"><a href="#some-utils-for-writing-web-servers" class="anchor"></a>Some utils for writing web servers</h2><dl><dt>since</dt><dd>0.2</dd></dl></header><dl><dt class="spec value" id="val-percent_encode"><a href="#val-percent_encode" class="anchor"></a><code><span class="keyword">val</span> percent_encode : <span>?⁠skip:<span>(char <span>-></span> bool)</span></span> <span>-></span> string <span>-></span> string</code></dt><dd><p>Encode the string into a valid path following https://tools.ietf.org/html/rfc3986#section-2.1</p><dl><dt>parameter skip</dt><dd><p>if provided, allows to preserve some characters, e.g. '/' in a path.</p></dd></dl></dd></dl><dl><dt class="spec value" id="val-percent_decode"><a href="#val-percent_decode" class="anchor"></a><code><span class="keyword">val</span> percent_decode : string <span>-></span> <span>string option</span></code></dt><dd><p>Inverse operation of <a href="index.html#val-percent_encode"><code>percent_encode</code></a>. Can fail since some strings are not valid percent encodings.</p></dd></dl><dl><dt class="spec value" id="val-split_query"><a href="#val-split_query" class="anchor"></a><code><span class="keyword">val</span> split_query : string <span>-></span> string * string</code></dt><dd><p>Split a path between the path and the query</p><dl><dt>since</dt><dd>0.5</dd></dl></dd></dl><dl><dt class="spec value" id="val-split_on_slash"><a href="#val-split_on_slash" class="anchor"></a><code><span class="keyword">val</span> split_on_slash : string <span>-></span> <span>string list</span></code></dt><dd><p>Split a string on <code>'/'</code>, remove the trailing <code>'/'</code> if any.</p><dl><dt>since</dt><dd>0.6</dd></dl></dd></dl><dl><dt class="spec value" id="val-get_non_query_path"><a href="#val-get_non_query_path" class="anchor"></a><code><span class="keyword">val</span> get_non_query_path : string <span>-></span> string</code></dt><dd><p>get the part of the path that is not the query parameters.</p><dl><dt>since</dt><dd>0.5</dd></dl></dd></dl><dl><dt class="spec value" id="val-get_query"><a href="#val-get_query" class="anchor"></a><code><span class="keyword">val</span> get_query : string <span>-></span> string</code></dt><dd><p>Obtain the query part of a path.</p><dl><dt>since</dt><dd>0.4</dd></dl></dd></dl><dl><dt class="spec value" id="val-parse_query"><a href="#val-parse_query" class="anchor"></a><code><span class="keyword">val</span> parse_query : string <span>-></span> <span><span>(<span><span>(string * string)</span> list</span>, string)</span> Stdlib.result</span></code></dt><dd><p>Parse a query as a list of <code>'&'</code> or <code>';'</code> separated <code>key=value</code> pairs. The order might not be preserved.</p><dl><dt>since</dt><dd>0.3</dd></dl></dd></dl></div></body></html>
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>index (tiny_httpd.index)</title><link rel="stylesheet" href="../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – tiny_httpd</nav><h1 id="tiny_httpd-index"><a href="#tiny_httpd-index" class="anchor"></a>tiny_httpd index</h1><nav class="toc"><ul><li><a href="#library-tiny_httpd">Library tiny_httpd</a></li></ul></nav></header><h2 id="library-tiny_httpd"><a href="#library-tiny_httpd" class="anchor"></a>Library tiny_httpd</h2><p>This library exposes the following toplevel modules:</p><ul class="modules"><li><a href="Tiny_httpd/index.html"><code>Tiny_httpd</code></a></li><li><a href="Tiny_httpd_atomic_/index.html"><code>Tiny_httpd_atomic_</code></a></li><li><a href="Tiny_httpd_buf/index.html"><code>Tiny_httpd_buf</code></a></li><li><a href="Tiny_httpd_dir/index.html"><code>Tiny_httpd_dir</code></a></li><li><a href="Tiny_httpd_html/index.html"><code>Tiny_httpd_html</code></a></li><li><a href="Tiny_httpd_html_/index.html"><code>Tiny_httpd_html_</code></a></li><li><a href="Tiny_httpd_io/index.html"><code>Tiny_httpd_io</code></a></li><li><a href="Tiny_httpd_pool/index.html"><code>Tiny_httpd_pool</code></a></li><li><a href="Tiny_httpd_server/index.html"><code>Tiny_httpd_server</code></a></li><li><a href="Tiny_httpd_stream/index.html"><code>Tiny_httpd_stream</code></a></li><li><a href="Tiny_httpd_util/index.html"><code>Tiny_httpd_util</code></a></li></ul></div></body></html>
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Tiny_httpd_camlzip (tiny_httpd_camlzip.Tiny_httpd_camlzip)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../index.html">tiny_httpd_camlzip</a> » Tiny_httpd_camlzip</nav><h1>Module <code>Tiny_httpd_camlzip</code></h1><p>Middleware for compression.</p><p>This uses camlzip to provide deflate compression/decompression. If installed, the middleware will compress responses' bodies when they are streams or fixed-size above a given limit (but it will not compress small, fixed-size bodies).</p></header><dl><dt class="spec value" id="val-middleware"><a href="#val-middleware" class="anchor"></a><code><span class="keyword">val</span> middleware : <span>?⁠compress_above:int</span> <span>-></span> <span>?⁠buf_size:int</span> <span>-></span> unit <span>-></span> <a href="../../tiny_httpd/Tiny_httpd_server/Middleware/index.html#type-t">Tiny_httpd_server.Middleware.t</a></code></dt><dd><p>Middleware responsible for deflate compression/decompression.</p><dl><dt>parameter compress_above</dt><dd><p>threshold, in bytes, above which a response body that has a known content-length is compressed. Stream bodies are always compressed.</p></dd></dl><dl><dt>parameter buf_size</dt><dd><p>size of the underlying buffer for compression/decompression</p></dd></dl><dl><dt>since</dt><dd>0.11</dd></dl></dd></dl><dl><dt class="spec value" id="val-setup"><a href="#val-setup" class="anchor"></a><code><span class="keyword">val</span> setup : <span>?⁠compress_above:int</span> <span>-></span> <span>?⁠buf_size:int</span> <span>-></span> <a href="../../tiny_httpd/Tiny_httpd_server/index.html#type-t">Tiny_httpd_server.t</a> <span>-></span> unit</code></dt><dd><p>Install middleware for tiny_httpd to be able to encode/decode compressed streams</p><dl><dt>parameter compress_above</dt><dd><p>threshold above with string responses are compressed</p></dd></dl><dl><dt>parameter buf_size</dt><dd><p>size of the underlying buffer for compression/decompression</p></dd></dl></dd></dl></div></body></html>
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>index (tiny_httpd_camlzip.index)</title><link rel="stylesheet" href="../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – tiny_httpd_camlzip</nav><h1 id="tiny_httpd_camlzip-index"><a href="#tiny_httpd_camlzip-index" class="anchor"></a>tiny_httpd_camlzip index</h1><nav class="toc"><ul><li><a href="#library-tiny_httpd_camlzip">Library tiny_httpd_camlzip</a></li></ul></nav></header><h2 id="library-tiny_httpd_camlzip"><a href="#library-tiny_httpd_camlzip" class="anchor"></a>Library tiny_httpd_camlzip</h2><p>The entry point of this library is the module: <a href="Tiny_httpd_camlzip/index.html"><code>Tiny_httpd_camlzip</code></a>.</p></div></body></html>
|
|
||||||
Loading…
Add table
Reference in a new issue