mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-14 22:39:57 -04:00
deploy: 46d1289d95
This commit is contained in:
parent
1680cd6a42
commit
8e0c79ed41
1478 changed files with 1499 additions and 1482 deletions
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>BE (angstrom.Angstrom.BE)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">angstrom</a> » <a href="../index.html">Angstrom</a> » BE</nav><header class="odoc-preamble"><h1>Module <code><span>Angstrom.BE</span></code></h1><p>Big endian parsers</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-int16"><a href="#val-int16" class="anchor"></a><code><span><span class="keyword">val</span> int16 : <span>int <span class="arrow">-></span></span> <span>unit <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>int16 i</code> accept two bytes that match the two lower order bytes of <code>i</code> and returns unit.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-int32"><a href="#val-int32" class="anchor"></a><code><span><span class="keyword">val</span> int32 : <span>int32 <span class="arrow">-></span></span> <span>unit <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>int32 i</code> accept four bytes that match the four bytes of <code>i</code> and returns unit.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-int64"><a href="#val-int64" class="anchor"></a><code><span><span class="keyword">val</span> int64 : <span>int64 <span class="arrow">-></span></span> <span>unit <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>int64 i</code> accept eight bytes that match the eight bytes of <code>i</code> and returns unit.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_int16"><a href="#val-any_int16" class="anchor"></a><code><span><span class="keyword">val</span> any_int16 : <span>int <a href="../index.html#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_int32"><a href="#val-any_int32" class="anchor"></a><code><span><span class="keyword">val</span> any_int32 : <span>int32 <a href="../index.html#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_int64"><a href="#val-any_int64" class="anchor"></a><code><span><span class="keyword">val</span> any_int64 : <span>int64 <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>any_intN</code> reads <code>N</code> bits and interprets them as big endian signed integers.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_uint16"><a href="#val-any_uint16" class="anchor"></a><code><span><span class="keyword">val</span> any_uint16 : <span>int <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>any_uint16</code> reads <code>16</code> bits and interprets them as a big endian unsigned integer.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_float"><a href="#val-any_float" class="anchor"></a><code><span><span class="keyword">val</span> any_float : <span>float <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>any_float</code> reads 32 bits and interprets them as a big endian floating point value.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_double"><a href="#val-any_double" class="anchor"></a><code><span><span class="keyword">val</span> any_double : <span>float <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>any_double</code> reads 64 bits and interprets them as a big endian floating point value.</p></div></div></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>BE (angstrom.Angstrom.BE)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">angstrom</a> » <a href="../index.html">Angstrom</a> » BE</nav><header class="odoc-preamble"><h1>Module <code><span>Angstrom.BE</span></code></h1><p>Big endian parsers</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-int16"><a href="#val-int16" class="anchor"></a><code><span><span class="keyword">val</span> int16 : <span>int <span class="arrow">-></span></span> <span>unit <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>int16 i</code> accept two bytes that match the two lower order bytes of <code>i</code> and returns unit.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-int32"><a href="#val-int32" class="anchor"></a><code><span><span class="keyword">val</span> int32 : <span>int32 <span class="arrow">-></span></span> <span>unit <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>int32 i</code> accept four bytes that match the four bytes of <code>i</code> and returns unit.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-int64"><a href="#val-int64" class="anchor"></a><code><span><span class="keyword">val</span> int64 : <span>int64 <span class="arrow">-></span></span> <span>unit <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>int64 i</code> accept eight bytes that match the eight bytes of <code>i</code> and returns unit.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_int16"><a href="#val-any_int16" class="anchor"></a><code><span><span class="keyword">val</span> any_int16 : <span>int <a href="../index.html#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_int32"><a href="#val-any_int32" class="anchor"></a><code><span><span class="keyword">val</span> any_int32 : <span>int32 <a href="../index.html#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_int64"><a href="#val-any_int64" class="anchor"></a><code><span><span class="keyword">val</span> any_int64 : <span>int64 <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>any_intN</code> reads <code>N</code> bits and interprets them as big endian signed integers.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_uint16"><a href="#val-any_uint16" class="anchor"></a><code><span><span class="keyword">val</span> any_uint16 : <span>int <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>any_uint16</code> reads <code>16</code> bits and interprets them as a big endian unsigned integer.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_float"><a href="#val-any_float" class="anchor"></a><code><span><span class="keyword">val</span> any_float : <span>float <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>any_float</code> reads 32 bits and interprets them as a big endian floating point value.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_double"><a href="#val-any_double" class="anchor"></a><code><span><span class="keyword">val</span> any_double : <span>float <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>any_double</code> reads 64 bits and interprets them as a big endian floating point value.</p></div></div></div></body></html>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Consume (angstrom.Angstrom.Consume)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">angstrom</a> » <a href="../index.html">Angstrom</a> » Consume</nav><header class="odoc-preamble"><h1>Module <code><span>Angstrom.Consume</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span><span> = </span></code><ol><li id="type-t.Prefix" class="def variant constructor anchored"><a href="#type-t.Prefix" class="anchor"></a><code><span>| </span><span><span class="constructor">Prefix</span></span></code></li><li id="type-t.All" class="def variant constructor anchored"><a href="#type-t.All" class="anchor"></a><code><span>| </span><span><span class="constructor">All</span></span></code></li></ol></div></div></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Consume (angstrom.Angstrom.Consume)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">angstrom</a> » <a href="../index.html">Angstrom</a> » Consume</nav><header class="odoc-preamble"><h1>Module <code><span>Angstrom.Consume</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span><span> = </span></code><ol><li id="type-t.Prefix" class="def variant constructor anchored"><a href="#type-t.Prefix" class="anchor"></a><code><span>| </span><span><span class="constructor">Prefix</span></span></code></li><li id="type-t.All" class="def variant constructor anchored"><a href="#type-t.All" class="anchor"></a><code><span>| </span><span><span class="constructor">All</span></span></code></li></ol></div></div></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>LE (angstrom.Angstrom.LE)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">angstrom</a> » <a href="../index.html">Angstrom</a> » LE</nav><header class="odoc-preamble"><h1>Module <code><span>Angstrom.LE</span></code></h1><p>Little endian parsers</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-int16"><a href="#val-int16" class="anchor"></a><code><span><span class="keyword">val</span> int16 : <span>int <span class="arrow">-></span></span> <span>unit <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>int16 i</code> accept two bytes that match the two lower order bytes of <code>i</code> and returns unit.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-int32"><a href="#val-int32" class="anchor"></a><code><span><span class="keyword">val</span> int32 : <span>int32 <span class="arrow">-></span></span> <span>unit <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>int32 i</code> accept four bytes that match the four bytes of <code>i</code> and returns unit.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-int64"><a href="#val-int64" class="anchor"></a><code><span><span class="keyword">val</span> int64 : <span>int64 <span class="arrow">-></span></span> <span>unit <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>int32 i</code> accept eight bytes that match the eight bytes of <code>i</code> and returns unit.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_int16"><a href="#val-any_int16" class="anchor"></a><code><span><span class="keyword">val</span> any_int16 : <span>int <a href="../index.html#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_int32"><a href="#val-any_int32" class="anchor"></a><code><span><span class="keyword">val</span> any_int32 : <span>int32 <a href="../index.html#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_int64"><a href="#val-any_int64" class="anchor"></a><code><span><span class="keyword">val</span> any_int64 : <span>int64 <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>any_intN</code> reads <code>N</code> bits and interprets them as little endian signed integers.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_uint16"><a href="#val-any_uint16" class="anchor"></a><code><span><span class="keyword">val</span> any_uint16 : <span>int <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>uint16</code> reads <code>16</code> bits and interprets them as a little endian unsigned integer.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_float"><a href="#val-any_float" class="anchor"></a><code><span><span class="keyword">val</span> any_float : <span>float <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>any_float</code> reads 32 bits and interprets them as a little endian floating point value.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_double"><a href="#val-any_double" class="anchor"></a><code><span><span class="keyword">val</span> any_double : <span>float <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>any_double</code> reads 64 bits and interprets them as a little endian floating point value.</p></div></div></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>LE (angstrom.Angstrom.LE)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">angstrom</a> » <a href="../index.html">Angstrom</a> » LE</nav><header class="odoc-preamble"><h1>Module <code><span>Angstrom.LE</span></code></h1><p>Little endian parsers</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-int16"><a href="#val-int16" class="anchor"></a><code><span><span class="keyword">val</span> int16 : <span>int <span class="arrow">-></span></span> <span>unit <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>int16 i</code> accept two bytes that match the two lower order bytes of <code>i</code> and returns unit.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-int32"><a href="#val-int32" class="anchor"></a><code><span><span class="keyword">val</span> int32 : <span>int32 <span class="arrow">-></span></span> <span>unit <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>int32 i</code> accept four bytes that match the four bytes of <code>i</code> and returns unit.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-int64"><a href="#val-int64" class="anchor"></a><code><span><span class="keyword">val</span> int64 : <span>int64 <span class="arrow">-></span></span> <span>unit <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>int32 i</code> accept eight bytes that match the eight bytes of <code>i</code> and returns unit.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_int16"><a href="#val-any_int16" class="anchor"></a><code><span><span class="keyword">val</span> any_int16 : <span>int <a href="../index.html#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_int32"><a href="#val-any_int32" class="anchor"></a><code><span><span class="keyword">val</span> any_int32 : <span>int32 <a href="../index.html#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_int64"><a href="#val-any_int64" class="anchor"></a><code><span><span class="keyword">val</span> any_int64 : <span>int64 <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>any_intN</code> reads <code>N</code> bits and interprets them as little endian signed integers.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_uint16"><a href="#val-any_uint16" class="anchor"></a><code><span><span class="keyword">val</span> any_uint16 : <span>int <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>uint16</code> reads <code>16</code> bits and interprets them as a little endian unsigned integer.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_float"><a href="#val-any_float" class="anchor"></a><code><span><span class="keyword">val</span> any_float : <span>float <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>any_float</code> reads 32 bits and interprets them as a little endian floating point value.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-any_double"><a href="#val-any_double" class="anchor"></a><code><span><span class="keyword">val</span> any_double : <span>float <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>any_double</code> reads 64 bits and interprets them as a little endian floating point value.</p></div></div></div></body></html>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Let_syntax (angstrom.Angstrom.Let_syntax)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">angstrom</a> » <a href="../index.html">Angstrom</a> » Let_syntax</nav><header class="odoc-preamble"><h1>Module <code><span>Angstrom.Let_syntax</span></code></h1><p>The <code>Let_syntax</code> module is intended to be used with the <code>ppx_let</code> pre-processor, and just contains copies of functions described elsewhere.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="../index.html#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>|)"><a href="#val-(>>|)" class="anchor"></a><code><span><span class="keyword">val</span> (>>|) : <span><span><span class="type-var">'a</span> <a href="../index.html#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span class="type-var">'b</span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="../index.html#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="../index.html#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="../index.html#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="../index.html#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Let_syntax"><a href="#module-Let_syntax" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Let_syntax/index.html">Let_syntax</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Let_syntax (angstrom.Angstrom.Let_syntax)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">angstrom</a> » <a href="../index.html">Angstrom</a> » Let_syntax</nav><header class="odoc-preamble"><h1>Module <code><span>Angstrom.Let_syntax</span></code></h1><p>The <code>Let_syntax</code> module is intended to be used with the <code>ppx_let</code> pre-processor, and just contains copies of functions described elsewhere.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="../index.html#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>|)"><a href="#val-(>>|)" class="anchor"></a><code><span><span class="keyword">val</span> (>>|) : <span><span><span class="type-var">'a</span> <a href="../index.html#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span class="type-var">'b</span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="../index.html#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="../index.html#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="../index.html#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="../index.html#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Let_syntax"><a href="#module-Let_syntax" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Let_syntax/index.html">Let_syntax</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div></div></body></html>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Unsafe (angstrom.Angstrom.Unsafe)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">angstrom</a> » <a href="../index.html">Angstrom</a> » Unsafe</nav><header class="odoc-preamble"><h1>Module <code><span>Angstrom.Unsafe</span></code></h1><p>Unsafe Operations on Angstrom's Internal Buffer</p><p>These functions are considered <b>unsafe</b> as they expose the input buffer to client code without any protections against modification, or leaking references. They are exposed to support performance-sensitive parsers that want to avoid allocation at all costs. Client code should take care to write the input buffer callback functions such that they:</p><ul><li>do not modify the input buffer <i>outside</i> of the range <code>[off, off + len)</code>;</li><li>do not modify the input buffer <i>inside</i> of the range <code>[off, off + len)</code> if the parser might backtrack; and</li><li>do not return any direct or indirect references to the input buffer.</li></ul><p>If the input buffer callback functions do not do any of these things, then the client may consider their use safe.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-take"><a href="#val-take" class="anchor"></a><code><span><span class="keyword">val</span> take : <span>int <span class="arrow">-></span></span> <span><span>(<span><a href="../index.html#type-bigstring">bigstring</a> <span class="arrow">-></span></span> <span><span class="label">off</span>:int <span class="arrow">-></span></span> <span><span class="label">len</span>:int <span class="arrow">-></span></span> <span class="type-var">'a</span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>take n f</code> accepts exactly <code>n</code> characters of input into the parser's internal buffer then calls <code>f buffer ~off ~len</code>. <code>buffer</code> is the parser's internal buffer. <code>off</code> is the offset from the start of <code>buffer</code> containing the requested content. <code>len</code> is the length of the requested content. <code>len</code> is guaranteed to be equal to <code>n</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-take_while"><a href="#val-take_while" class="anchor"></a><code><span><span class="keyword">val</span> take_while :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Unsafe (angstrom.Angstrom.Unsafe)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">angstrom</a> » <a href="../index.html">Angstrom</a> » Unsafe</nav><header class="odoc-preamble"><h1>Module <code><span>Angstrom.Unsafe</span></code></h1><p>Unsafe Operations on Angstrom's Internal Buffer</p><p>These functions are considered <b>unsafe</b> as they expose the input buffer to client code without any protections against modification, or leaking references. They are exposed to support performance-sensitive parsers that want to avoid allocation at all costs. Client code should take care to write the input buffer callback functions such that they:</p><ul><li>do not modify the input buffer <i>outside</i> of the range <code>[off, off + len)</code>;</li><li>do not modify the input buffer <i>inside</i> of the range <code>[off, off + len)</code> if the parser might backtrack; and</li><li>do not return any direct or indirect references to the input buffer.</li></ul><p>If the input buffer callback functions do not do any of these things, then the client may consider their use safe.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-take"><a href="#val-take" class="anchor"></a><code><span><span class="keyword">val</span> take : <span>int <span class="arrow">-></span></span> <span><span>(<span><a href="../index.html#type-bigstring">bigstring</a> <span class="arrow">-></span></span> <span><span class="label">off</span>:int <span class="arrow">-></span></span> <span><span class="label">len</span>:int <span class="arrow">-></span></span> <span class="type-var">'a</span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>take n f</code> accepts exactly <code>n</code> characters of input into the parser's internal buffer then calls <code>f buffer ~off ~len</code>. <code>buffer</code> is the parser's internal buffer. <code>off</code> is the offset from the start of <code>buffer</code> containing the requested content. <code>len</code> is the length of the requested content. <code>len</code> is guaranteed to be equal to <code>n</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-take_while"><a href="#val-take_while" class="anchor"></a><code><span><span class="keyword">val</span> take_while :
|
||||
<span><span>(<span>char <span class="arrow">-></span></span> bool)</span> <span class="arrow">-></span></span>
|
||||
<span><span>(<span><a href="../index.html#type-bigstring">bigstring</a> <span class="arrow">-></span></span> <span><span class="label">off</span>:int <span class="arrow">-></span></span> <span><span class="label">len</span>:int <span class="arrow">-></span></span> <span class="type-var">'a</span>)</span> <span class="arrow">-></span></span>
|
||||
<span><span class="type-var">'a</span> <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>take_while check f</code> accepts input into the parser's interal buffer as long as <code>check</code> returns <code>true</code> then calls <code>f buffer ~off ~len</code>. <code>buffer</code> is the parser's internal buffer. <code>off</code> is the offset from the start of <code>buffer</code> containing the requested content. <code>len</code> is the length of the content matched by <code>check</code>.</p><p>This parser does not fail. If <code>check</code> returns <code>false</code> on the first character, <code>len</code> will be <code>0</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-take_while1"><a href="#val-take_while1" class="anchor"></a><code><span><span class="keyword">val</span> take_while1 :
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Angstrom__ (angstrom.Angstrom__)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">angstrom</a> » Angstrom__</nav><header class="odoc-preamble"><h1>Module <code><span>Angstrom__</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Angstrom__ (angstrom.Angstrom__)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">angstrom</a> » Angstrom__</nav><header class="odoc-preamble"><h1>Module <code><span>Angstrom__</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Angstrom__Buffering (angstrom.Angstrom__Buffering)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">angstrom</a> » Angstrom__Buffering</nav><header class="odoc-preamble"><h1>Module <code><span>Angstrom__Buffering</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Angstrom__Buffering (angstrom.Angstrom__Buffering)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">angstrom</a> » Angstrom__Buffering</nav><header class="odoc-preamble"><h1>Module <code><span>Angstrom__Buffering</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Angstrom__Exported_state (angstrom.Angstrom__Exported_state)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">angstrom</a> » Angstrom__Exported_state</nav><header class="odoc-preamble"><h1>Module <code><span>Angstrom__Exported_state</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Angstrom__Exported_state (angstrom.Angstrom__Exported_state)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">angstrom</a> » Angstrom__Exported_state</nav><header class="odoc-preamble"><h1>Module <code><span>Angstrom__Exported_state</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Angstrom__Input (angstrom.Angstrom__Input)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">angstrom</a> » Angstrom__Input</nav><header class="odoc-preamble"><h1>Module <code><span>Angstrom__Input</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Angstrom__Input (angstrom.Angstrom__Input)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">angstrom</a> » Angstrom__Input</nav><header class="odoc-preamble"><h1>Module <code><span>Angstrom__Input</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Angstrom__More (angstrom.Angstrom__More)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">angstrom</a> » Angstrom__More</nav><header class="odoc-preamble"><h1>Module <code><span>Angstrom__More</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Angstrom__More (angstrom.Angstrom__More)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">angstrom</a> » Angstrom__More</nav><header class="odoc-preamble"><h1>Module <code><span>Angstrom__More</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Angstrom__Parser (angstrom.Angstrom__Parser)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">angstrom</a> » Angstrom__Parser</nav><header class="odoc-preamble"><h1>Module <code><span>Angstrom__Parser</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Angstrom__Parser (angstrom.Angstrom__Parser)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">angstrom</a> » Angstrom__Parser</nav><header class="odoc-preamble"><h1>Module <code><span>Angstrom__Parser</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>index (angstrom.index)</title><meta charset="utf-8"/><link rel="stylesheet" href="../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../index.html">Index</a> » angstrom</nav><header class="odoc-preamble"><h1 id="package-angstrom"><a href="#package-angstrom" class="anchor"></a>Package angstrom <nav> <a href="#package_info">more…</a></nav></h1><ul class="modules"><li><a href="Angstrom/index.html"><code>Angstrom</code></a> <span class="synopsis">Parser combinators built for speed and memory-efficiency.</span></li></ul></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#package_info">Package info</a></li></ul></nav></div><div class="odoc-content"><h2 id="package_info"><a href="#package_info" class="anchor"></a>Package info</h2><table class="package info"><tr id="info-license-files"><td><a href="#info-license-files" aria-hidden="true" class="anchor"></a>license-files</td><td><ul><li><a type="text/plain; charset=UTF-8" href="_doc-dir/LICENSE">LICENSE</a></li></ul></td></tr><tr id="info-readme-files"><td><a href="#info-readme-files" aria-hidden="true" class="anchor"></a>readme-files</td><td><ul><li><a type="text/plain; charset=UTF-8" href="_doc-dir/README.md">README.md</a></li></ul></td></tr></table></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>index (angstrom.index)</title><meta charset="utf-8"/><link rel="stylesheet" href="../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../index.html">Index</a> » angstrom</nav><header class="odoc-preamble"><h1 id="package-angstrom"><a href="#package-angstrom" class="anchor"></a>Package angstrom <nav> <a href="#package_info">more…</a></nav></h1><ul class="modules"><li><a href="Angstrom/index.html"><code>Angstrom</code></a> <span class="synopsis">Parser combinators built for speed and memory-efficiency.</span></li></ul></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#package_info">Package info</a></li></ul></nav></div><div class="odoc-content"><h2 id="package_info"><a href="#package_info" class="anchor"></a>Package info</h2><table class="package info"><tr id="info-license-files"><td><a href="#info-license-files" aria-hidden="true" class="anchor"></a>license-files</td><td><ul><li><a type="text/plain; charset=UTF-8" href="_doc-dir/LICENSE">LICENSE</a></li></ul></td></tr><tr id="info-readme-files"><td><a href="#info-readme-files" aria-hidden="true" class="anchor"></a>readme-files</td><td><ul><li><a type="text/plain; charset=UTF-8" href="_doc-dir/README.md">README.md</a></li></ul></td></tr></table></div></body></html>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>index (bigstringaf.index)</title><meta charset="utf-8"/><link rel="stylesheet" href="../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../index.html">Index</a> » bigstringaf</nav><header class="odoc-preamble"><h1 id="package-bigstringaf"><a href="#package-bigstringaf" class="anchor"></a>Package bigstringaf <nav><a type="text/plain; charset=UTF-8" href="_doc-dir/CHANGES.md">changes</a> <a href="#package_info">more…</a></nav></h1><ul class="modules"><li><a href="Bigstringaf/index.html"><code>Bigstringaf</code></a> <span class="synopsis">Bigstrings, but fast.</span></li></ul></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#package_info">Package info</a></li></ul></nav></div><div class="odoc-content"><h2 id="package_info"><a href="#package_info" class="anchor"></a>Package info</h2><table class="package info"><tr id="info-changes-files"><td><a href="#info-changes-files" aria-hidden="true" class="anchor"></a>changes-files</td><td><ul><li><a type="text/plain; charset=UTF-8" href="_doc-dir/CHANGES.md">CHANGES.md</a></li></ul></td></tr><tr id="info-license-files"><td><a href="#info-license-files" aria-hidden="true" class="anchor"></a>license-files</td><td><ul><li><a type="text/plain; charset=UTF-8" href="_doc-dir/LICENSE">LICENSE</a></li></ul></td></tr><tr id="info-readme-files"><td><a href="#info-readme-files" aria-hidden="true" class="anchor"></a>readme-files</td><td><ul><li><a type="text/plain; charset=UTF-8" href="_doc-dir/README.md">README.md</a></li></ul></td></tr></table></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>index (bigstringaf.index)</title><meta charset="utf-8"/><link rel="stylesheet" href="../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../index.html">Index</a> » bigstringaf</nav><header class="odoc-preamble"><h1 id="package-bigstringaf"><a href="#package-bigstringaf" class="anchor"></a>Package bigstringaf <nav><a type="text/plain; charset=UTF-8" href="_doc-dir/CHANGES.md">changes</a> <a href="#package_info">more…</a></nav></h1><ul class="modules"><li><a href="Bigstringaf/index.html"><code>Bigstringaf</code></a> <span class="synopsis">Bigstrings, but fast.</span></li></ul></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#package_info">Package info</a></li></ul></nav></div><div class="odoc-content"><h2 id="package_info"><a href="#package_info" class="anchor"></a>Package info</h2><table class="package info"><tr id="info-changes-files"><td><a href="#info-changes-files" aria-hidden="true" class="anchor"></a>changes-files</td><td><ul><li><a type="text/plain; charset=UTF-8" href="_doc-dir/CHANGES.md">CHANGES.md</a></li></ul></td></tr><tr id="info-license-files"><td><a href="#info-license-files" aria-hidden="true" class="anchor"></a>license-files</td><td><ul><li><a type="text/plain; charset=UTF-8" href="_doc-dir/LICENSE">LICENSE</a></li></ul></td></tr><tr id="info-readme-files"><td><a href="#info-readme-files" aria-hidden="true" class="anchor"></a>readme-files</td><td><ul><li><a type="text/plain; charset=UTF-8" href="_doc-dir/README.md">README.md</a></li></ul></td></tr></table></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Arg (cmdliner.Cmdliner.Arg)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cmdliner</a> » <a href="../index.html">Cmdliner</a> » Arg</nav><header class="odoc-preamble"><h1>Module <code><span>Cmdliner.Arg</span></code></h1><p>Terms for command line arguments.</p><p>This module provides functions to define terms that evaluate to the arguments provided on the command line.</p><p>Basic constraints, like the argument type or repeatability, are specified by defining a value of type <a href="#type-t"><code>Arg.t</code></a>. Further constraints can be specified during the <a href="#argterms" title="argterms">conversion</a> to a term.</p></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#argconv">Argument converters</a></li><li><a href="#arginfo">Arguments and their information</a></li><li><a href="#optargs">Optional arguments</a></li><li><a href="#posargs">Positional arguments</a></li><li><a href="#argterms">Arguments as terms</a></li><li><a href="#predef">Predefined arguments</a></li><li><a href="#converters">Predefined converters</a></li><li><a href="#doc_helpers">Documentation formatting helpers</a></li><li><a href="#deprecated">Deprecated</a></li></ul></nav></div><div class="odoc-content"><h2 id="argconv"><a href="#argconv" class="anchor"></a>Argument converters</h2><p>An argument converter transforms a string argument of the command line to an OCaml value. <a href="#converters" title="converters">Predefined converters</a> are provided for many types of the standard library.</p><div class="odoc-spec"><div class="spec type anchored" id="type-parser"><a href="#type-parser" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a parser</span></span><span> = <span>string <span class="arrow">-></span></span> <span>[ <span>`Ok of <span class="type-var">'a</span></span> <span><span>| `Error</span> of string</span> ]</span></span></code></div><div class="spec-doc"><p>The type for argument parsers.</p><p><b>Deprecated.</b> Use parser signatures of <a href="#val-conv"><code>conv</code></a> or <a href="#val-conv'"><code>conv'</code></a>.</p><ul class="at-tags"><li class="deprecated"><span class="at-tag">deprecated</span> Use Arg.conv or Arg.conv' instead.</li></ul></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-printer"><a href="#type-printer" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a printer</span></span><span> = <span><a href="../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <span class="arrow">-></span></span> unit</span></code></div><div class="spec-doc"><p>The type for converted argument printers.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conv"><a href="#type-conv" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a conv</span></span><span> = <span><span class="type-var">'a</span> <a href="#type-parser">parser</a></span> * <span><span class="type-var">'a</span> <a href="#type-printer">printer</a></span></span></code></div><div class="spec-doc"><p>The type for argument converters.</p><p><b>Warning.</b> Do not use directly, use <a href="#val-conv"><code>conv</code></a> or <a href="#val-conv'"><code>conv'</code></a>. This type will become abstract in the next major version of cmdliner.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-conv"><a href="#val-conv" class="anchor"></a><code><span><span class="keyword">val</span> conv :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Arg (cmdliner.Cmdliner.Arg)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cmdliner</a> » <a href="../index.html">Cmdliner</a> » Arg</nav><header class="odoc-preamble"><h1>Module <code><span>Cmdliner.Arg</span></code></h1><p>Terms for command line arguments.</p><p>This module provides functions to define terms that evaluate to the arguments provided on the command line.</p><p>Basic constraints, like the argument type or repeatability, are specified by defining a value of type <a href="#type-t"><code>Arg.t</code></a>. Further constraints can be specified during the <a href="#argterms" title="argterms">conversion</a> to a term.</p></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#argconv">Argument converters</a></li><li><a href="#arginfo">Arguments and their information</a></li><li><a href="#optargs">Optional arguments</a></li><li><a href="#posargs">Positional arguments</a></li><li><a href="#argterms">Arguments as terms</a></li><li><a href="#predef">Predefined arguments</a></li><li><a href="#converters">Predefined converters</a></li><li><a href="#doc_helpers">Documentation formatting helpers</a></li><li><a href="#deprecated">Deprecated</a></li></ul></nav></div><div class="odoc-content"><h2 id="argconv"><a href="#argconv" class="anchor"></a>Argument converters</h2><p>An argument converter transforms a string argument of the command line to an OCaml value. <a href="#converters" title="converters">Predefined converters</a> are provided for many types of the standard library.</p><div class="odoc-spec"><div class="spec type anchored" id="type-parser"><a href="#type-parser" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a parser</span></span><span> = <span>string <span class="arrow">-></span></span> <span>[ <span>`Ok of <span class="type-var">'a</span></span> <span><span>| `Error</span> of string</span> ]</span></span></code></div><div class="spec-doc"><p>The type for argument parsers.</p><p><b>Deprecated.</b> Use parser signatures of <a href="#val-conv"><code>conv</code></a> or <a href="#val-conv'"><code>conv'</code></a>.</p><ul class="at-tags"><li class="deprecated"><span class="at-tag">deprecated</span> Use Arg.conv or Arg.conv' instead.</li></ul></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-printer"><a href="#type-printer" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a printer</span></span><span> = <span><a href="../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <span class="arrow">-></span></span> unit</span></code></div><div class="spec-doc"><p>The type for converted argument printers.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conv"><a href="#type-conv" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a conv</span></span><span> = <span><span class="type-var">'a</span> <a href="#type-parser">parser</a></span> * <span><span class="type-var">'a</span> <a href="#type-printer">printer</a></span></span></code></div><div class="spec-doc"><p>The type for argument converters.</p><p><b>Warning.</b> Do not use directly, use <a href="#val-conv"><code>conv</code></a> or <a href="#val-conv'"><code>conv'</code></a>. This type will become abstract in the next major version of cmdliner.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-conv"><a href="#val-conv" class="anchor"></a><code><span><span class="keyword">val</span> conv :
|
||||
<span><span class="optlabel">?docv</span>:string <span class="arrow">-></span></span>
|
||||
<span><span>(<span>(<span>string <span class="arrow">-></span></span> <span><span>(<span class="type-var">'a</span>, <span>[ <span>`Msg of string</span> ]</span>)</span> <a href="../../../ocaml/Stdlib/index.html#type-result">result</a></span>)</span> * <span><span class="type-var">'a</span> <a href="#type-printer">printer</a></span>)</span> <span class="arrow">-></span></span>
|
||||
<span><span class="type-var">'a</span> <a href="#type-conv">conv</a></span></span></code></div><div class="spec-doc"><p><code>conv ~docv (parse, print)</code> is an argument converter parsing values with <code>parse</code> and printing them with <code>print</code>. <code>docv</code> is a documentation meta-variable used in the documentation to stand for the argument value, defaults to <code>"VALUE"</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-conv'"><a href="#val-conv'" class="anchor"></a><code><span><span class="keyword">val</span> conv' :
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Env (cmdliner.Cmdliner.Cmd.Env)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cmdliner</a> » <a href="../../index.html">Cmdliner</a> » <a href="../index.html">Cmd</a> » Env</nav><header class="odoc-preamble"><h1>Module <code><span>Cmd.Env</span></code></h1><p>Environment variable and their information.</p></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#envvars">Environment variables</a></li><li><a href="#info">Environment variable information</a></li></ul></nav></div><div class="odoc-content"><h2 id="envvars"><a href="#envvars" class="anchor"></a>Environment variables</h2><div class="odoc-spec"><div class="spec type anchored" id="type-var"><a href="#type-var" class="anchor"></a><code><span><span class="keyword">type</span> var</span><span> = string</span></code></div><div class="spec-doc"><p>The type for environment names.</p></div></div><h2 id="info"><a href="#info" class="anchor"></a>Environment variable information</h2><div class="odoc-spec"><div class="spec type anchored" id="type-info"><a href="#type-info" class="anchor"></a><code><span><span class="keyword">type</span> info</span><span> = <a href="../../Term/index.html#type-env_info">Term.env_info</a></span></code></div><div class="spec-doc"><p>The type for environment variable information.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-info"><a href="#val-info" class="anchor"></a><code><span><span class="keyword">val</span> info : <span><span class="optlabel">?deprecated</span>:string <span class="arrow">-></span></span> <span><span class="optlabel">?docs</span>:string <span class="arrow">-></span></span> <span><span class="optlabel">?doc</span>:string <span class="arrow">-></span></span> <span><a href="#type-var">var</a> <span class="arrow">-></span></span> <a href="#type-info">info</a></span></code></div><div class="spec-doc"><p><code>info ~docs ~doc var</code> describes an environment variable <code>var</code> such that:</p><ul><li><code>doc</code> is the man page information of the environment variable, defaults to <code>"undocumented"</code>.</li><li><code>docs</code> is the title of the man page section in which the environment variable will be listed, it defaults to <a href="../../Manpage/index.html#val-s_environment"><code>Cmdliner.Manpage.s_environment</code></a>.</li><li><code>deprecated</code>, if specified the environment is deprecated and the string is a message output on standard error when the environment variable gets used to lookup the default value of an argument.</li></ul><p>In <code>doc</code> the <a href="../../../tool_man.html#doclang" title="doclang">documentation markup language</a> can be used with following variables:</p><ul><li><code>$(env)</code>, the value of <code>var</code>.</li><li>The variables mentioned in <a href="#val-info"><code>info</code></a>.</li></ul></div></div></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Env (cmdliner.Cmdliner.Cmd.Env)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cmdliner</a> » <a href="../../index.html">Cmdliner</a> » <a href="../index.html">Cmd</a> » Env</nav><header class="odoc-preamble"><h1>Module <code><span>Cmd.Env</span></code></h1><p>Environment variable and their information.</p></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#envvars">Environment variables</a></li><li><a href="#info">Environment variable information</a></li></ul></nav></div><div class="odoc-content"><h2 id="envvars"><a href="#envvars" class="anchor"></a>Environment variables</h2><div class="odoc-spec"><div class="spec type anchored" id="type-var"><a href="#type-var" class="anchor"></a><code><span><span class="keyword">type</span> var</span><span> = string</span></code></div><div class="spec-doc"><p>The type for environment names.</p></div></div><h2 id="info"><a href="#info" class="anchor"></a>Environment variable information</h2><div class="odoc-spec"><div class="spec type anchored" id="type-info"><a href="#type-info" class="anchor"></a><code><span><span class="keyword">type</span> info</span><span> = <a href="../../Term/index.html#type-env_info">Term.env_info</a></span></code></div><div class="spec-doc"><p>The type for environment variable information.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-info"><a href="#val-info" class="anchor"></a><code><span><span class="keyword">val</span> info : <span><span class="optlabel">?deprecated</span>:string <span class="arrow">-></span></span> <span><span class="optlabel">?docs</span>:string <span class="arrow">-></span></span> <span><span class="optlabel">?doc</span>:string <span class="arrow">-></span></span> <span><a href="#type-var">var</a> <span class="arrow">-></span></span> <a href="#type-info">info</a></span></code></div><div class="spec-doc"><p><code>info ~docs ~doc var</code> describes an environment variable <code>var</code> such that:</p><ul><li><code>doc</code> is the man page information of the environment variable, defaults to <code>"undocumented"</code>.</li><li><code>docs</code> is the title of the man page section in which the environment variable will be listed, it defaults to <a href="../../Manpage/index.html#val-s_environment"><code>Cmdliner.Manpage.s_environment</code></a>.</li><li><code>deprecated</code>, if specified the environment is deprecated and the string is a message output on standard error when the environment variable gets used to lookup the default value of an argument.</li></ul><p>In <code>doc</code> the <a href="../../../tool_man.html#doclang" title="doclang">documentation markup language</a> can be used with following variables:</p><ul><li><code>$(env)</code>, the value of <code>var</code>.</li><li>The variables mentioned in <a href="#val-info"><code>info</code></a>.</li></ul></div></div></div></body></html>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cmd (cmdliner.Cmdliner.Cmd)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cmdliner</a> » <a href="../index.html">Cmdliner</a> » Cmd</nav><header class="odoc-preamble"><h1>Module <code><span>Cmdliner.Cmd</span></code></h1><p>Commands.</p><p>Command line syntaxes are implicitely defined by <a href="../Term/index.html"><code>Term</code></a>s. A command value binds a syntax and its documentation to a command name.</p><p>A command can group a list of sub commands (and recursively). In this case your tool defines a tree of commands, each with its own command line syntax. The root of that tree is called the <em>main command</em>; it represents your tool and its name.</p></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#info">Command information</a></li><li><a href="#cmds">Commands</a></li><li><a href="#eval">Evaluation</a><ul><li><a href="#eval_low">Low level evaluation</a></li></ul></li></ul></nav></div><div class="odoc-content"><h2 id="info"><a href="#info" class="anchor"></a>Command information</h2><p>Command information defines the name and documentation of a command.</p><div class="odoc-spec"><div class="spec module anchored" id="module-Exit"><a href="#module-Exit" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Exit/index.html">Exit</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Exit codes and their information.</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Env"><a href="#module-Env" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Env/index.html">Env</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Environment variable and their information.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-info"><a href="#type-info" class="anchor"></a><code><span><span class="keyword">type</span> info</span></code></div><div class="spec-doc"><p>The type for information about commands.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-info"><a href="#val-info" class="anchor"></a><code><span><span class="keyword">val</span> info :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cmd (cmdliner.Cmdliner.Cmd)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cmdliner</a> » <a href="../index.html">Cmdliner</a> » Cmd</nav><header class="odoc-preamble"><h1>Module <code><span>Cmdliner.Cmd</span></code></h1><p>Commands.</p><p>Command line syntaxes are implicitely defined by <a href="../Term/index.html"><code>Term</code></a>s. A command value binds a syntax and its documentation to a command name.</p><p>A command can group a list of sub commands (and recursively). In this case your tool defines a tree of commands, each with its own command line syntax. The root of that tree is called the <em>main command</em>; it represents your tool and its name.</p></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#info">Command information</a></li><li><a href="#cmds">Commands</a></li><li><a href="#eval">Evaluation</a><ul><li><a href="#eval_low">Low level evaluation</a></li></ul></li></ul></nav></div><div class="odoc-content"><h2 id="info"><a href="#info" class="anchor"></a>Command information</h2><p>Command information defines the name and documentation of a command.</p><div class="odoc-spec"><div class="spec module anchored" id="module-Exit"><a href="#module-Exit" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Exit/index.html">Exit</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Exit codes and their information.</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Env"><a href="#module-Env" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Env/index.html">Env</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Environment variable and their information.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-info"><a href="#type-info" class="anchor"></a><code><span><span class="keyword">type</span> info</span></code></div><div class="spec-doc"><p>The type for information about commands.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-info"><a href="#val-info" class="anchor"></a><code><span><span class="keyword">val</span> info :
|
||||
<span><span class="optlabel">?deprecated</span>:string <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?man_xrefs</span>:<span><a href="../Manpage/index.html#type-xref">Manpage.xref</a> list</span> <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?man</span>:<span><a href="../Manpage/index.html#type-block">Manpage.block</a> list</span> <span class="arrow">-></span></span>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Syntax (cmdliner.Cmdliner.Term.Syntax)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cmdliner</a> » <a href="../../index.html">Cmdliner</a> » <a href="../index.html">Term</a> » Syntax</nav><header class="odoc-preamble"><h1>Module <code><span>Term.Syntax</span></code></h1><p><code>let</code> operators.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-(let+)"><a href="#val-(let+)" class="anchor"></a><code><span><span class="keyword">val</span> (let+) : <span><span><span class="type-var">'a</span> <a href="../index.html#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span class="type-var">'b</span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>( let+ )</code> is <a href="../index.html#val-map"><code>map</code></a>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(and+)"><a href="#val-(and+)" class="anchor"></a><code><span><span class="keyword">val</span> (and+) : <span><span><span class="type-var">'a</span> <a href="../index.html#type-t">t</a></span> <span class="arrow">-></span></span> <span><span><span class="type-var">'b</span> <a href="../index.html#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span class="type-var">'a</span> * <span class="type-var">'b</span>)</span> <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>( and* )</code> is <a href="../index.html#val-product"><code>product</code></a>.</p></div></div></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Syntax (cmdliner.Cmdliner.Term.Syntax)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cmdliner</a> » <a href="../../index.html">Cmdliner</a> » <a href="../index.html">Term</a> » Syntax</nav><header class="odoc-preamble"><h1>Module <code><span>Term.Syntax</span></code></h1><p><code>let</code> operators.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-(let+)"><a href="#val-(let+)" class="anchor"></a><code><span><span class="keyword">val</span> (let+) : <span><span><span class="type-var">'a</span> <a href="../index.html#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span class="type-var">'b</span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>( let+ )</code> is <a href="../index.html#val-map"><code>map</code></a>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(and+)"><a href="#val-(and+)" class="anchor"></a><code><span><span class="keyword">val</span> (and+) : <span><span><span class="type-var">'a</span> <a href="../index.html#type-t">t</a></span> <span class="arrow">-></span></span> <span><span><span class="type-var">'b</span> <a href="../index.html#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span class="type-var">'a</span> * <span class="type-var">'b</span>)</span> <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>( and* )</code> is <a href="../index.html#val-product"><code>product</code></a>.</p></div></div></div></body></html>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cmdliner (cmdliner.Cmdliner)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">cmdliner</a> » Cmdliner</nav><header class="odoc-preamble"><h1>Module <code><span>Cmdliner</span></code></h1><p>Declarative definition of command line interfaces.</p><p>Consult the <a href="../tutorial.html" title="tutorial">tutorial</a>, details about the supported <a href="../cli.html" title="cli">command line syntax</a> and <a href="../examples.html" title="examples">examples</a> of use.</p><p>Open the module to use it, it defines only three modules in your scope.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Manpage"><a href="#module-Manpage" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Manpage/index.html">Manpage</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Man page specification.</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Term"><a href="#module-Term" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Term/index.html">Term</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Terms.</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Cmd"><a href="#module-Cmd" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Cmd/index.html">Cmd</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Commands.</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Arg"><a href="#module-Arg" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Arg/index.html">Arg</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Terms for command line arguments.</p></div></div></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cmdliner (cmdliner.Cmdliner)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">cmdliner</a> » Cmdliner</nav><header class="odoc-preamble"><h1>Module <code><span>Cmdliner</span></code></h1><p>Declarative definition of command line interfaces.</p><p>Consult the <a href="../tutorial.html" title="tutorial">tutorial</a>, details about the supported <a href="../cli.html" title="cli">command line syntax</a> and <a href="../examples.html" title="examples">examples</a> of use.</p><p>Open the module to use it, it defines only three modules in your scope.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Manpage"><a href="#module-Manpage" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Manpage/index.html">Manpage</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Man page specification.</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Term"><a href="#module-Term" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Term/index.html">Term</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Terms.</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Cmd"><a href="#module-Cmd" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Cmd/index.html">Cmd</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Commands.</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Arg"><a href="#module-Arg" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Arg/index.html">Arg</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Terms for command line arguments.</p></div></div></div></body></html>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>examples (cmdliner.examples)</title><meta charset="utf-8"/><link rel="stylesheet" href="../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="index.html">Up</a> – <a href="../index.html">Index</a> » <a href="index.html">cmdliner</a> » examples</nav><header class="odoc-preamble"><h1 id="examples"><a href="#examples" class="anchor"></a>Examples</h1><p>The examples are self-contained, cut and paste them in a file to play with them.</p></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#exrm">A <code>rm</code> command</a></li><li><a href="#excp">A <code>cp</code> command</a></li><li><a href="#extail">A <code>tail</code> command</a></li><li><a href="#exdarcs">A <code>darcs</code> command</a></li></ul></nav></div><div class="odoc-content"><h2 id="exrm"><a href="#exrm" class="anchor"></a>A <code>rm</code> command</h2><p>We define the command line interface of an <code>rm</code> command with the synopsis:</p><pre>rm [OPTION]… FILE…</pre><p>The <code>-f</code>, <code>-i</code> and <code>-I</code> flags define the prompt behaviour of <code>rm</code>. It is represented in our program by the <code>prompt</code> type. If more than one of these flags is present on the command line the last one takes precedence.</p><p>To implement this behaviour we map the presence of these flags to values of the <code>prompt</code> type by using <a href="Cmdliner/Arg/index.html#val-vflag_all"><code>Cmdliner.Arg.vflag_all</code></a>.</p><p>This argument will contain all occurrences of the flag on the command line and we just take the <a href="Cmdliner/Arg/index.html#val-last"><code>Cmdliner.Arg.last</code></a> one to define our term value. If there is no occurrence the last value of the default list <code>[Always]</code> is taken. This means the default prompt behaviour is <code>Always</code>.</p><pre class="language-ocaml"><code>(* Implementation of the command, we just print the args. *)
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>examples (cmdliner.examples)</title><meta charset="utf-8"/><link rel="stylesheet" href="../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="index.html">Up</a> – <a href="../index.html">Index</a> » <a href="index.html">cmdliner</a> » examples</nav><header class="odoc-preamble"><h1 id="examples"><a href="#examples" class="anchor"></a>Examples</h1><p>The examples are self-contained, cut and paste them in a file to play with them.</p></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#exrm">A <code>rm</code> command</a></li><li><a href="#excp">A <code>cp</code> command</a></li><li><a href="#extail">A <code>tail</code> command</a></li><li><a href="#exdarcs">A <code>darcs</code> command</a></li></ul></nav></div><div class="odoc-content"><h2 id="exrm"><a href="#exrm" class="anchor"></a>A <code>rm</code> command</h2><p>We define the command line interface of an <code>rm</code> command with the synopsis:</p><pre>rm [OPTION]… FILE…</pre><p>The <code>-f</code>, <code>-i</code> and <code>-I</code> flags define the prompt behaviour of <code>rm</code>. It is represented in our program by the <code>prompt</code> type. If more than one of these flags is present on the command line the last one takes precedence.</p><p>To implement this behaviour we map the presence of these flags to values of the <code>prompt</code> type by using <a href="Cmdliner/Arg/index.html#val-vflag_all"><code>Cmdliner.Arg.vflag_all</code></a>.</p><p>This argument will contain all occurrences of the flag on the command line and we just take the <a href="Cmdliner/Arg/index.html#val-last"><code>Cmdliner.Arg.last</code></a> one to define our term value. If there is no occurrence the last value of the default list <code>[Always]</code> is taken. This means the default prompt behaviour is <code>Always</code>.</p><pre class="language-ocaml"><code>(* Implementation of the command, we just print the args. *)
|
||||
|
||||
type prompt = Always | Once | Never
|
||||
let prompt_str = function
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>index (cmdliner.index)</title><meta charset="utf-8"/><link rel="stylesheet" href="../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../index.html">Index</a> » cmdliner</nav><header class="odoc-preamble"><h1 id="package-cmdliner"><a href="#package-cmdliner" class="anchor"></a>Package cmdliner <nav><a type="text/plain; charset=UTF-8" href="_doc-dir/CHANGES.md">changes</a> <a href="#package_info">more…</a></nav></h1><p><code>Cmdliner</code> provides a simple and compositional mechanism to convert command line arguments to OCaml values and pass them to your functions.</p><p>The library automatically handles syntax errors, help messages and UNIX man page generation. It supports programs with single or multiple commands (like <code>git</code>) and respect most of the <a href="http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html">POSIX</a> and <a href="http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html">GNU</a> conventions.</p></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#manuals">Manuals</a></li><li><a href="#api">API</a></li><li><a href="#package_info">Package info</a></li></ul></nav></div><div class="odoc-content"><h2 id="manuals"><a href="#manuals" class="anchor"></a>Manuals</h2><p>The following manuals are available.</p><ul><li>The <a href="tutorial.html" title="tutorial">tutorial</a> gets you through the steps to write your first command line interface with Cmdliner.</li><li>The <a href="cli.html" title="cli">Command line interface manual</a> describes how command lines and environment variables are parsed by Cmdliner.</li><li><a href="tool_man.html" title="tool_man">Tool man pages</a> describes how Cmdliner generates man pages for your tools and how you can format them.</li><li>The <a href="examples.html" title="examples">examples page</a> has a few annoted examples that show to express the command line interface of a few classic tools with Cmdliner</li></ul><h2 id="api"><a href="#api" class="anchor"></a>API</h2><ul class="modules"><li><a href="Cmdliner/index.html"><code>Cmdliner</code></a> <span class="synopsis">Declarative definition of command line interfaces.</span></li></ul><h2 id="package_info"><a href="#package_info" class="anchor"></a>Package info</h2><table class="package info"><tr id="info-changes-files"><td><a href="#info-changes-files" aria-hidden="true" class="anchor"></a>changes-files</td><td><ul><li><a type="text/plain; charset=UTF-8" href="_doc-dir/CHANGES.md">CHANGES.md</a></li></ul></td></tr><tr id="info-license-files"><td><a href="#info-license-files" aria-hidden="true" class="anchor"></a>license-files</td><td><ul><li><a type="text/plain; charset=UTF-8" href="_doc-dir/LICENSE.md">LICENSE.md</a></li></ul></td></tr><tr id="info-readme-files"><td><a href="#info-readme-files" aria-hidden="true" class="anchor"></a>readme-files</td><td><ul><li><a type="text/plain; charset=UTF-8" href="_doc-dir/README.md">README.md</a></li></ul></td></tr></table></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>index (cmdliner.index)</title><meta charset="utf-8"/><link rel="stylesheet" href="../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../index.html">Index</a> » cmdliner</nav><header class="odoc-preamble"><h1 id="package-cmdliner"><a href="#package-cmdliner" class="anchor"></a>Package cmdliner <nav><a type="text/plain; charset=UTF-8" href="_doc-dir/CHANGES.md">changes</a> <a href="#package_info">more…</a></nav></h1><p><code>Cmdliner</code> provides a simple and compositional mechanism to convert command line arguments to OCaml values and pass them to your functions.</p><p>The library automatically handles syntax errors, help messages and UNIX man page generation. It supports programs with single or multiple commands (like <code>git</code>) and respect most of the <a href="http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html">POSIX</a> and <a href="http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html">GNU</a> conventions.</p></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#manuals">Manuals</a></li><li><a href="#api">API</a></li><li><a href="#package_info">Package info</a></li></ul></nav></div><div class="odoc-content"><h2 id="manuals"><a href="#manuals" class="anchor"></a>Manuals</h2><p>The following manuals are available.</p><ul><li>The <a href="tutorial.html" title="tutorial">tutorial</a> gets you through the steps to write your first command line interface with Cmdliner.</li><li>The <a href="cli.html" title="cli">Command line interface manual</a> describes how command lines and environment variables are parsed by Cmdliner.</li><li><a href="tool_man.html" title="tool_man">Tool man pages</a> describes how Cmdliner generates man pages for your tools and how you can format them.</li><li>The <a href="examples.html" title="examples">examples page</a> has a few annoted examples that show to express the command line interface of a few classic tools with Cmdliner</li></ul><h2 id="api"><a href="#api" class="anchor"></a>API</h2><ul class="modules"><li><a href="Cmdliner/index.html"><code>Cmdliner</code></a> <span class="synopsis">Declarative definition of command line interfaces.</span></li></ul><h2 id="package_info"><a href="#package_info" class="anchor"></a>Package info</h2><table class="package info"><tr id="info-changes-files"><td><a href="#info-changes-files" aria-hidden="true" class="anchor"></a>changes-files</td><td><ul><li><a type="text/plain; charset=UTF-8" href="_doc-dir/CHANGES.md">CHANGES.md</a></li></ul></td></tr><tr id="info-license-files"><td><a href="#info-license-files" aria-hidden="true" class="anchor"></a>license-files</td><td><ul><li><a type="text/plain; charset=UTF-8" href="_doc-dir/LICENSE.md">LICENSE.md</a></li></ul></td></tr><tr id="info-readme-files"><td><a href="#info-readme-files" aria-hidden="true" class="anchor"></a>readme-files</td><td><ul><li><a type="text/plain; charset=UTF-8" href="_doc-dir/README.md">README.md</a></li></ul></td></tr></table></div></body></html>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>tutorial (cmdliner.tutorial)</title><meta charset="utf-8"/><link rel="stylesheet" href="../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="index.html">Up</a> – <a href="../index.html">Index</a> » <a href="index.html">cmdliner</a> » tutorial</nav><header class="odoc-preamble"><h1 id="tutorial"><a href="#tutorial" class="anchor"></a>Tutorial</h1></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#started">Getting started</a></li><li><a href="#subcommands">Sub commands</a></li></ul></nav></div><div class="odoc-content"><h2 id="started"><a href="#started" class="anchor"></a>Getting started</h2><p>With <code>Cmdliner</code> your tool's <code>main</code> function evaluates a command.</p><p>A command is a value of type <a href="Cmdliner/Cmd/index.html#type-t"><code>Cmdliner.Cmd.t</code></a> which gathers a command name and a term of type <a href="Cmdliner/Term/index.html#type-t"><code>Cmdliner.Term.t</code></a>. A term is an expression to be evaluated. The type parameter of the term (and the command) indicates the type of the result of the evaluation.</p><p>One way to create terms is by lifting regular OCaml values with <a href="Cmdliner/Term/index.html#val-const"><code>Cmdliner.Term.const</code></a>. Terms can be applied to terms evaluating to functional values with <a href="Cmdliner/Term/index.html#val-($)"><code>Cmdliner.Term.($)</code></a>.</p><p>For example, in a <code>revolt.ml</code> file, for the function:</p><pre class="language-ocaml"><code>let revolt () = print_endline "Revolt!"</code></pre><p>the term :</p><pre class="language-ocaml"><code>open Cmdliner
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>tutorial (cmdliner.tutorial)</title><meta charset="utf-8"/><link rel="stylesheet" href="../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="index.html">Up</a> – <a href="../index.html">Index</a> » <a href="index.html">cmdliner</a> » tutorial</nav><header class="odoc-preamble"><h1 id="tutorial"><a href="#tutorial" class="anchor"></a>Tutorial</h1></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#started">Getting started</a></li><li><a href="#subcommands">Sub commands</a></li></ul></nav></div><div class="odoc-content"><h2 id="started"><a href="#started" class="anchor"></a>Getting started</h2><p>With <code>Cmdliner</code> your tool's <code>main</code> function evaluates a command.</p><p>A command is a value of type <a href="Cmdliner/Cmd/index.html#type-t"><code>Cmdliner.Cmd.t</code></a> which gathers a command name and a term of type <a href="Cmdliner/Term/index.html#type-t"><code>Cmdliner.Term.t</code></a>. A term is an expression to be evaluated. The type parameter of the term (and the command) indicates the type of the result of the evaluation.</p><p>One way to create terms is by lifting regular OCaml values with <a href="Cmdliner/Term/index.html#val-const"><code>Cmdliner.Term.const</code></a>. Terms can be applied to terms evaluating to functional values with <a href="Cmdliner/Term/index.html#val-($)"><code>Cmdliner.Term.($)</code></a>.</p><p>For example, in a <code>revolt.ml</code> file, for the function:</p><pre class="language-ocaml"><code>let revolt () = print_endline "Revolt!"</code></pre><p>the term :</p><pre class="language-ocaml"><code>open Cmdliner
|
||||
|
||||
let revolt_t = Term.(const revolt $ const ())</code></pre><p>is a term that evaluates to the result (and effect) of the <code>revolt</code> function. This term can be attached to a command:</p><pre class="language-ocaml"><code>let cmd = Cmd.v (Cmd.info "revolt") revolt_t</code></pre><p>and evaluated with <a href="Cmdliner/Cmd/index.html#val-eval"><code>Cmdliner.Cmd.eval</code></a>:</p><pre class="language-ocaml"><code>let () = exit (Cmd.eval cmd)</code></pre><p>This defines a command line tool named <code>"revolt"</code> (this name will be used in error reporting and documentation generation), without command line arguments, that just prints <code>"Revolt!"</code> on <code>stdout</code>.</p><pre class="language-ocaml"><code>> ocamlfind ocamlopt -linkpkg -package cmdliner -o revolt revolt.ml
|
||||
> ./revolt
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp-lwt.Cohttp_lwt.Client.Make.Connection.Net.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../../../index.html">Index</a> » <a href="../../../../../../index.html">cohttp-lwt</a> » <a href="../../../../../index.html">Cohttp_lwt</a> » <a href="../../../../index.html">Client</a> » <a href="../../../index.html">Make</a> » <a href="../../index.html">Connection</a> » <a href="../index.html">Net</a> » IO</nav><header class="odoc-preamble"><h1>Module <code><span>Net.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp-lwt.Cohttp_lwt.Client.Make.Connection.Net.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../../../index.html">Index</a> » <a href="../../../../../../index.html">cohttp-lwt</a> » <a href="../../../../../index.html">Cohttp_lwt</a> » <a href="../../../../index.html">Client</a> » <a href="../../../index.html">Make</a> » <a href="../../index.html">Connection</a> » <a href="../index.html">Net</a> » IO</nav><header class="odoc-preamble"><h1>Module <code><span>Net.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<span><a href="#type-ic">ic</a> <span class="arrow">-></span></span>
|
||||
<span><span class="label">f</span>:<span>(<span>string <span class="arrow">-></span></span> <span><span class="label">pos</span>:int <span class="arrow">-></span></span> <span><span class="label">len</span>:int <span class="arrow">-></span></span> <span class="type-var">'a</span> * int)</span> <span class="arrow">-></span></span>
|
||||
<span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read_line"><a href="#val-read_line" class="anchor"></a><code><span><span class="keyword">val</span> read_line : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>string option</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read_line ic</code> will read a single line terminated by CR or CRLF from the input channel <code>ic</code>. It returns <code>None</code> if EOF or other error condition is reached.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read"><a href="#val-read" class="anchor"></a><code><span><span class="keyword">val</span> read : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span>int <span class="arrow">-></span></span> <span>string <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read ic len</code> will block until a maximum of <code>len</code> characters are read from the input channel <code>ic</code>. It returns an empty string if EOF or some other error condition occurs on the input channel, and can also return fewer than <code>len</code> characters if input buffering is not sufficient to satisfy the request.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-write"><a href="#val-write" class="anchor"></a><code><span><span class="keyword">val</span> write : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>string <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>write oc s</code> will block until the complete <code>s</code> string is written to the output channel <code>oc</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-flush"><a href="#val-flush" class="anchor"></a><code><span><span class="keyword">val</span> flush : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>flush oc</code> will return when all previously buffered content from calling <a href="#val-write"><code>write</code></a> have been written to the output channel <code>oc</code>.</p></div></div></details></div><div class="odoc-spec"><div class="spec type anchored" id="type-error"><a href="#type-error" class="anchor"></a><code><span><span class="keyword">type</span> error</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-catch"><a href="#val-catch" class="anchor"></a><code><span><span class="keyword">val</span> catch : <span><span>(<span>unit <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span><span>(<span class="type-var">'a</span>, <a href="#type-error">error</a>)</span> <a href="../../../../../../../ocaml/Stdlib/index.html#type-result">result</a></span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>catch f</code> is <code>f () >|= Result.ok</code>, unless <code>f</code> fails with an IO error, in which case it returns the error.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pp_error"><a href="#val-pp_error" class="anchor"></a><code><span><span class="keyword">val</span> pp_error : <span><a href="../../../../../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">-></span></span> <span><a href="#type-error">error</a> <span class="arrow">-></span></span> unit</span></code></div></div></div></body></html>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Connection (cohttp-lwt.Cohttp_lwt.Client.Make.Connection)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../index.html">Index</a> » <a href="../../../../index.html">cohttp-lwt</a> » <a href="../../../index.html">Cohttp_lwt</a> » <a href="../../index.html">Client</a> » <a href="../index.html">Make</a> » Connection</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make.Connection</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Net"><a href="#module-Net" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Net/index.html">Net</a></span><span> : <a href="../../../S/module-type-Net/index.html">S.Net</a></span></code></div></div><div class="odoc-spec"><div class="spec exception anchored" id="exception-Retry"><a href="#exception-Retry" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Retry</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Connection (cohttp-lwt.Cohttp_lwt.Client.Make.Connection)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../index.html">Index</a> » <a href="../../../../index.html">cohttp-lwt</a> » <a href="../../../index.html">Cohttp_lwt</a> » <a href="../../index.html">Client</a> » <a href="../index.html">Make</a> » Connection</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make.Connection</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Net"><a href="#module-Net" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Net/index.html">Net</a></span><span> : <a href="../../../S/module-type-Net/index.html">S.Net</a></span></code></div></div><div class="odoc-spec"><div class="spec exception anchored" id="exception-Retry"><a href="#exception-Retry" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Retry</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create :
|
||||
<span><span class="optlabel">?finalise</span>:<span>(<span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span>unit <a href="Net/IO/index.html#type-t">Net.IO.t</a></span>)</span> <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?persistent</span>:bool <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?ctx</span>:<a href="Net/index.html#type-ctx">Net.ctx</a> <span class="arrow">-></span></span>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Make (cohttp-lwt.Cohttp_lwt.Client.Make)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">Client</a> » Make</nav><header class="odoc-preamble"><h1>Module <code><span>Client.Make</span></code></h1></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#parameters">Parameters</a></li><li><a href="#signature">Signature</a></li></ul></nav></div><div class="odoc-content"><h2 id="parameters"><a href="#parameters" class="anchor"></a>Parameters</h2><div class="odoc-spec"><div class="spec parameter anchored" id="argument-1-Connection"><a href="#argument-1-Connection" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-1-Connection/index.html">Connection</a></span><span> : <a href="../../S/module-type-Connection/index.html">S.Connection</a></span></code></div></div><h2 id="signature"><a href="#signature" class="anchor"></a>Signature</h2><div class="odoc-spec"><div class="spec type anchored" id="type-ctx"><a href="#type-ctx" class="anchor"></a><code><span><span class="keyword">type</span> ctx</span><span> = <a href="argument-1-Connection/Net/index.html#type-ctx">Connection.Net.ctx</a></span></code></div></div><div class="odoc-include"><div class="spec-doc"><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">ctx</span> <p>If provided, no connection cache is used, but <a href="../../Connection_cache/Make_no_cache/index.html#val-create"><code>Connection_cache.Make_no_cache.create</code></a> is used to resolve uri and create a dedicated connection with <code>ctx</code>.</p></li></ul><p>In most cases you should use the more specific helper calls in the interface rather than invoke this function directly. See <a href="#val-head"><code>head</code></a>, <a href="#val-get"><code>get</code></a> and <a href="#val-post"><code>post</code></a> for some examples.</p></div><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../cohttp/Cohttp/Generic/Client/module-type-S/index.html">Cohttp.Generic.Client.S</a>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Make (cohttp-lwt.Cohttp_lwt.Client.Make)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">Client</a> » Make</nav><header class="odoc-preamble"><h1>Module <code><span>Client.Make</span></code></h1></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#parameters">Parameters</a></li><li><a href="#signature">Signature</a></li></ul></nav></div><div class="odoc-content"><h2 id="parameters"><a href="#parameters" class="anchor"></a>Parameters</h2><div class="odoc-spec"><div class="spec parameter anchored" id="argument-1-Connection"><a href="#argument-1-Connection" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-1-Connection/index.html">Connection</a></span><span> : <a href="../../S/module-type-Connection/index.html">S.Connection</a></span></code></div></div><h2 id="signature"><a href="#signature" class="anchor"></a>Signature</h2><div class="odoc-spec"><div class="spec type anchored" id="type-ctx"><a href="#type-ctx" class="anchor"></a><code><span><span class="keyword">type</span> ctx</span><span> = <a href="argument-1-Connection/Net/index.html#type-ctx">Connection.Net.ctx</a></span></code></div></div><div class="odoc-include"><div class="spec-doc"><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">ctx</span> <p>If provided, no connection cache is used, but <a href="../../Connection_cache/Make_no_cache/index.html#val-create"><code>Connection_cache.Make_no_cache.create</code></a> is used to resolve uri and create a dedicated connection with <code>ctx</code>.</p></li></ul><p>In most cases you should use the more specific helper calls in the interface rather than invoke this function directly. See <a href="#val-head"><code>head</code></a>, <a href="#val-get"><code>get</code></a> and <a href="#val-post"><code>post</code></a> for some examples.</p></div><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../cohttp/Cohttp/Generic/Client/module-type-S/index.html">Cohttp.Generic.Client.S</a>
|
||||
<span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../cohttp/Cohttp/Generic/Client/module-type-S/index.html#type-io">io</a></span> = <span><span class="type-var">'a</span> <a href="../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span>
|
||||
<span class="keyword">and</span> <span><span class="keyword">type</span> <a href="../../../../cohttp/Cohttp/Generic/Client/module-type-S/index.html#type-body">body</a> = <a href="../../Body/index.html#type-t">Body.t</a></span>
|
||||
<span class="keyword">and</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../cohttp/Cohttp/Generic/Client/module-type-S/index.html#type-with_context">with_context</a></span> = <span><span class="optlabel">?ctx</span>:<a href="#type-ctx">ctx</a> <span class="arrow">-></span></span> <span class="type-var">'a</span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-io"><a href="#type-io" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a io</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-with_context"><a href="#type-with_context" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a with_context</span></span><span> = <span><span class="optlabel">?ctx</span>:<a href="#type-ctx">ctx</a> <span class="arrow">-></span></span> <span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-body"><a href="#type-body" class="anchor"></a><code><span><span class="keyword">type</span> body</span><span> = <a href="../../Body/index.html#type-t">Body.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-map_context"><a href="#val-map_context" class="anchor"></a><code><span><span class="keyword">val</span> map_context : <span><span><span class="type-var">'a</span> <a href="#type-with_context">with_context</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span class="type-var">'b</span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-with_context">with_context</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-call"><a href="#val-call" class="anchor"></a><code><span><span class="keyword">val</span> call :
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Client (cohttp-lwt.Cohttp_lwt.Client)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cohttp-lwt</a> » <a href="../index.html">Cohttp_lwt</a> » Client</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt.Client</span></code></h1><p>The <code>Make</code> functor glues together a <a href="../../../cohttp/Cohttp/S/module-type-IO/index.html"><code>Cohttp.S.IO</code></a> implementation to send requests down a connection that is established by the <code>Net</code> module. The resulting module satisfies the <a href="#"><code>Client</code></a> module type.</p><p>The <a href="../../../logs/Logs/index.html"><code>Logs</code></a> source name for this module's logger is <code>"cohttp.lwt.client"</code>. When logging is enabled (at least <b>warning</b> level), eventual body leaks will be logged and easier to track.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Make"><a href="#module-Make" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Make/index.html">Make</a></span><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Client (cohttp-lwt.Cohttp_lwt.Client)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cohttp-lwt</a> » <a href="../index.html">Cohttp_lwt</a> » Client</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt.Client</span></code></h1><p>The <code>Make</code> functor glues together a <a href="../../../cohttp/Cohttp/S/module-type-IO/index.html"><code>Cohttp.S.IO</code></a> implementation to send requests down a connection that is established by the <code>Net</code> module. The resulting module satisfies the <a href="#"><code>Client</code></a> module type.</p><p>The <a href="../../../logs/Logs/index.html"><code>Logs</code></a> source name for this module's logger is <code>"cohttp.lwt.client"</code>. When logging is enabled (at least <b>warning</b> level), eventual body leaks will be logged and easier to track.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Make"><a href="#module-Make" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Make/index.html">Make</a></span><span>
|
||||
(<a href="Make/argument-1-Connection/index.html">Connection</a> : <a href="../S/module-type-Connection/index.html">S.Connection</a>) :
|
||||
<a href="../S/module-type-Client/index.html">S.Client</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="../S/module-type-Client/index.html#type-ctx">ctx</a> = <a href="Make/argument-1-Connection/Net/index.html#type-ctx">Connection.Net.ctx</a></span></span></code></div></div></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp-lwt.Cohttp_lwt.Connection.Make.Net.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../../index.html">Index</a> » <a href="../../../../../index.html">cohttp-lwt</a> » <a href="../../../../index.html">Cohttp_lwt</a> » <a href="../../../index.html">Connection</a> » <a href="../../index.html">Make</a> » <a href="../index.html">Net</a> » IO</nav><header class="odoc-preamble"><h1>Module <code><span>Net.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp-lwt.Cohttp_lwt.Connection.Make.Net.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../../index.html">Index</a> » <a href="../../../../../index.html">cohttp-lwt</a> » <a href="../../../../index.html">Cohttp_lwt</a> » <a href="../../../index.html">Connection</a> » <a href="../../index.html">Make</a> » <a href="../index.html">Net</a> » IO</nav><header class="odoc-preamble"><h1>Module <code><span>Net.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<span><a href="#type-ic">ic</a> <span class="arrow">-></span></span>
|
||||
<span><span class="label">f</span>:<span>(<span>string <span class="arrow">-></span></span> <span><span class="label">pos</span>:int <span class="arrow">-></span></span> <span><span class="label">len</span>:int <span class="arrow">-></span></span> <span class="type-var">'a</span> * int)</span> <span class="arrow">-></span></span>
|
||||
<span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read_line"><a href="#val-read_line" class="anchor"></a><code><span><span class="keyword">val</span> read_line : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>string option</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read_line ic</code> will read a single line terminated by CR or CRLF from the input channel <code>ic</code>. It returns <code>None</code> if EOF or other error condition is reached.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read"><a href="#val-read" class="anchor"></a><code><span><span class="keyword">val</span> read : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span>int <span class="arrow">-></span></span> <span>string <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read ic len</code> will block until a maximum of <code>len</code> characters are read from the input channel <code>ic</code>. It returns an empty string if EOF or some other error condition occurs on the input channel, and can also return fewer than <code>len</code> characters if input buffering is not sufficient to satisfy the request.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-write"><a href="#val-write" class="anchor"></a><code><span><span class="keyword">val</span> write : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>string <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>write oc s</code> will block until the complete <code>s</code> string is written to the output channel <code>oc</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-flush"><a href="#val-flush" class="anchor"></a><code><span><span class="keyword">val</span> flush : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>flush oc</code> will return when all previously buffered content from calling <a href="#val-write"><code>write</code></a> have been written to the output channel <code>oc</code>.</p></div></div></details></div><div class="odoc-spec"><div class="spec type anchored" id="type-error"><a href="#type-error" class="anchor"></a><code><span><span class="keyword">type</span> error</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-catch"><a href="#val-catch" class="anchor"></a><code><span><span class="keyword">val</span> catch : <span><span>(<span>unit <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span><span>(<span class="type-var">'a</span>, <a href="#type-error">error</a>)</span> <a href="../../../../../../ocaml/Stdlib/index.html#type-result">result</a></span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>catch f</code> is <code>f () >|= Result.ok</code>, unless <code>f</code> fails with an IO error, in which case it returns the error.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pp_error"><a href="#val-pp_error" class="anchor"></a><code><span><span class="keyword">val</span> pp_error : <span><a href="../../../../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">-></span></span> <span><a href="#type-error">error</a> <span class="arrow">-></span></span> unit</span></code></div></div></div></body></html>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Make (cohttp-lwt.Cohttp_lwt.Connection.Make)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">Connection</a> » Make</nav><header class="odoc-preamble"><h1>Module <code><span>Connection.Make</span></code></h1></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#parameters">Parameters</a></li><li><a href="#signature">Signature</a></li></ul></nav></div><div class="odoc-content"><h2 id="parameters"><a href="#parameters" class="anchor"></a>Parameters</h2><div class="odoc-spec"><div class="spec parameter anchored" id="argument-1-Net"><a href="#argument-1-Net" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-1-Net/index.html">Net</a></span><span> : <a href="../../S/module-type-Net/index.html">S.Net</a></span></code></div></div><h2 id="signature"><a href="#signature" class="anchor"></a>Signature</h2><div class="odoc-spec"><div class="spec module anchored" id="module-Net"><a href="#module-Net" class="anchor"></a><code><span><span class="keyword">module</span> Net</span><span> = <a href="argument-1-Net/index.html">Net</a></span></code></div></div><div class="odoc-spec"><div class="spec exception anchored" id="exception-Retry"><a href="#exception-Retry" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Retry</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Make (cohttp-lwt.Cohttp_lwt.Connection.Make)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">Connection</a> » Make</nav><header class="odoc-preamble"><h1>Module <code><span>Connection.Make</span></code></h1></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#parameters">Parameters</a></li><li><a href="#signature">Signature</a></li></ul></nav></div><div class="odoc-content"><h2 id="parameters"><a href="#parameters" class="anchor"></a>Parameters</h2><div class="odoc-spec"><div class="spec parameter anchored" id="argument-1-Net"><a href="#argument-1-Net" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-1-Net/index.html">Net</a></span><span> : <a href="../../S/module-type-Net/index.html">S.Net</a></span></code></div></div><h2 id="signature"><a href="#signature" class="anchor"></a>Signature</h2><div class="odoc-spec"><div class="spec module anchored" id="module-Net"><a href="#module-Net" class="anchor"></a><code><span><span class="keyword">module</span> Net</span><span> = <a href="argument-1-Net/index.html">Net</a></span></code></div></div><div class="odoc-spec"><div class="spec exception anchored" id="exception-Retry"><a href="#exception-Retry" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Retry</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create :
|
||||
<span><span class="optlabel">?finalise</span>:<span>(<span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span>unit <a href="argument-1-Net/IO/index.html#type-t">Net.IO.t</a></span>)</span> <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?persistent</span>:bool <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?ctx</span>:<a href="argument-1-Net/index.html#type-ctx">Net.ctx</a> <span class="arrow">-></span></span>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Connection (cohttp-lwt.Cohttp_lwt.Connection)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cohttp-lwt</a> » <a href="../index.html">Cohttp_lwt</a> » Connection</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt.Connection</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec exception anchored" id="exception-Retry"><a href="#exception-Retry" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Retry</span></span></code></div><div class="spec-doc"><p>Raised on failed requests that may be safely retried - even on non-idempotent requests. Raised for example on timeout or connection suhtdown by remote end.</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Make"><a href="#module-Make" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Make/index.html">Make</a></span><span> (<a href="Make/argument-1-Net/index.html">Net</a> : <a href="../S/module-type-Net/index.html">S.Net</a>) : <a href="../S/module-type-Connection/index.html">S.Connection</a> <span class="keyword">with</span> <span><span class="keyword">module</span> <a href="../S/module-type-Connection/Net/index.html">Net</a> = <a href="Make/argument-1-Net/index.html">Net</a></span></span></code></div></div></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Connection (cohttp-lwt.Cohttp_lwt.Connection)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cohttp-lwt</a> » <a href="../index.html">Cohttp_lwt</a> » Connection</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt.Connection</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec exception anchored" id="exception-Retry"><a href="#exception-Retry" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Retry</span></span></code></div><div class="spec-doc"><p>Raised on failed requests that may be safely retried - even on non-idempotent requests. Raised for example on timeout or connection suhtdown by remote end.</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Make"><a href="#module-Make" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Make/index.html">Make</a></span><span> (<a href="Make/argument-1-Net/index.html">Net</a> : <a href="../S/module-type-Net/index.html">S.Net</a>) : <a href="../S/module-type-Connection/index.html">S.Connection</a> <span class="keyword">with</span> <span><span class="keyword">module</span> <a href="../S/module-type-Connection/Net/index.html">Net</a> = <a href="Make/argument-1-Net/index.html">Net</a></span></span></code></div></div></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp-lwt.Cohttp_lwt.Connection_cache.Make.Connection.Net.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../../../index.html">Index</a> » <a href="../../../../../../index.html">cohttp-lwt</a> » <a href="../../../../../index.html">Cohttp_lwt</a> » <a href="../../../../index.html">Connection_cache</a> » <a href="../../../index.html">Make</a> » <a href="../../index.html">Connection</a> » <a href="../index.html">Net</a> » IO</nav><header class="odoc-preamble"><h1>Module <code><span>Net.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp-lwt.Cohttp_lwt.Connection_cache.Make.Connection.Net.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../../../index.html">Index</a> » <a href="../../../../../../index.html">cohttp-lwt</a> » <a href="../../../../../index.html">Cohttp_lwt</a> » <a href="../../../../index.html">Connection_cache</a> » <a href="../../../index.html">Make</a> » <a href="../../index.html">Connection</a> » <a href="../index.html">Net</a> » IO</nav><header class="odoc-preamble"><h1>Module <code><span>Net.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<span><a href="#type-ic">ic</a> <span class="arrow">-></span></span>
|
||||
<span><span class="label">f</span>:<span>(<span>string <span class="arrow">-></span></span> <span><span class="label">pos</span>:int <span class="arrow">-></span></span> <span><span class="label">len</span>:int <span class="arrow">-></span></span> <span class="type-var">'a</span> * int)</span> <span class="arrow">-></span></span>
|
||||
<span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read_line"><a href="#val-read_line" class="anchor"></a><code><span><span class="keyword">val</span> read_line : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>string option</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read_line ic</code> will read a single line terminated by CR or CRLF from the input channel <code>ic</code>. It returns <code>None</code> if EOF or other error condition is reached.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read"><a href="#val-read" class="anchor"></a><code><span><span class="keyword">val</span> read : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span>int <span class="arrow">-></span></span> <span>string <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read ic len</code> will block until a maximum of <code>len</code> characters are read from the input channel <code>ic</code>. It returns an empty string if EOF or some other error condition occurs on the input channel, and can also return fewer than <code>len</code> characters if input buffering is not sufficient to satisfy the request.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-write"><a href="#val-write" class="anchor"></a><code><span><span class="keyword">val</span> write : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>string <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>write oc s</code> will block until the complete <code>s</code> string is written to the output channel <code>oc</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-flush"><a href="#val-flush" class="anchor"></a><code><span><span class="keyword">val</span> flush : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>flush oc</code> will return when all previously buffered content from calling <a href="#val-write"><code>write</code></a> have been written to the output channel <code>oc</code>.</p></div></div></details></div><div class="odoc-spec"><div class="spec type anchored" id="type-error"><a href="#type-error" class="anchor"></a><code><span><span class="keyword">type</span> error</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-catch"><a href="#val-catch" class="anchor"></a><code><span><span class="keyword">val</span> catch : <span><span>(<span>unit <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span><span>(<span class="type-var">'a</span>, <a href="#type-error">error</a>)</span> <a href="../../../../../../../ocaml/Stdlib/index.html#type-result">result</a></span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>catch f</code> is <code>f () >|= Result.ok</code>, unless <code>f</code> fails with an IO error, in which case it returns the error.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pp_error"><a href="#val-pp_error" class="anchor"></a><code><span><span class="keyword">val</span> pp_error : <span><a href="../../../../../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">-></span></span> <span><a href="#type-error">error</a> <span class="arrow">-></span></span> unit</span></code></div></div></div></body></html>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Connection (cohttp-lwt.Cohttp_lwt.Connection_cache.Make.Connection)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../index.html">Index</a> » <a href="../../../../index.html">cohttp-lwt</a> » <a href="../../../index.html">Cohttp_lwt</a> » <a href="../../index.html">Connection_cache</a> » <a href="../index.html">Make</a> » Connection</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make.Connection</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Net"><a href="#module-Net" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Net/index.html">Net</a></span><span> : <a href="../../../S/module-type-Net/index.html">S.Net</a></span></code></div></div><div class="odoc-spec"><div class="spec exception anchored" id="exception-Retry"><a href="#exception-Retry" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Retry</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Connection (cohttp-lwt.Cohttp_lwt.Connection_cache.Make.Connection)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../index.html">Index</a> » <a href="../../../../index.html">cohttp-lwt</a> » <a href="../../../index.html">Cohttp_lwt</a> » <a href="../../index.html">Connection_cache</a> » <a href="../index.html">Make</a> » Connection</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make.Connection</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Net"><a href="#module-Net" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Net/index.html">Net</a></span><span> : <a href="../../../S/module-type-Net/index.html">S.Net</a></span></code></div></div><div class="odoc-spec"><div class="spec exception anchored" id="exception-Retry"><a href="#exception-Retry" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Retry</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create :
|
||||
<span><span class="optlabel">?finalise</span>:<span>(<span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span>unit <a href="Net/IO/index.html#type-t">Net.IO.t</a></span>)</span> <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?persistent</span>:bool <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?ctx</span>:<a href="Net/index.html#type-ctx">Net.ctx</a> <span class="arrow">-></span></span>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Sleep (cohttp-lwt.Cohttp_lwt.Connection_cache.Make.Sleep)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../index.html">Index</a> » <a href="../../../../index.html">cohttp-lwt</a> » <a href="../../../index.html">Cohttp_lwt</a> » <a href="../../index.html">Connection_cache</a> » <a href="../index.html">Make</a> » Sleep</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make.Sleep</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-sleep_ns"><a href="#val-sleep_ns" class="anchor"></a><code><span><span class="keyword">val</span> sleep_ns : <span>int64 <span class="arrow">-></span></span> <span>unit <a href="../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div></div></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Sleep (cohttp-lwt.Cohttp_lwt.Connection_cache.Make.Sleep)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../index.html">Index</a> » <a href="../../../../index.html">cohttp-lwt</a> » <a href="../../../index.html">Cohttp_lwt</a> » <a href="../../index.html">Connection_cache</a> » <a href="../index.html">Make</a> » Sleep</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make.Sleep</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-sleep_ns"><a href="#val-sleep_ns" class="anchor"></a><code><span><span class="keyword">val</span> sleep_ns : <span>int64 <span class="arrow">-></span></span> <span>unit <a href="../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div></div></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Make (cohttp-lwt.Cohttp_lwt.Connection_cache.Make)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">Connection_cache</a> » Make</nav><header class="odoc-preamble"><h1>Module <code><span>Connection_cache.Make</span></code></h1><p>This functor keeps a cache of connections for reuse. Connections are reused based on their remote <code>Conduit.endp</code> (effectively IP / port).</p></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#parameters">Parameters</a></li><li><a href="#signature">Signature</a></li></ul></nav></div><div class="odoc-content"><h2 id="parameters"><a href="#parameters" class="anchor"></a>Parameters</h2><div class="odoc-spec"><div class="spec parameter anchored" id="argument-1-Connection"><a href="#argument-1-Connection" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-1-Connection/index.html">Connection</a></span><span> : <a href="../../S/module-type-Connection/index.html">S.Connection</a></span></code></div></div><div class="odoc-spec"><div class="spec parameter anchored" id="argument-2-Sleep"><a href="#argument-2-Sleep" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-2-Sleep/index.html">Sleep</a></span><span> : <a href="../../S/module-type-Sleep/index.html">S.Sleep</a></span></code></div></div><h2 id="signature"><a href="#signature" class="anchor"></a>Signature</h2><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../S/module-type-Connection_cache/index.html">S.Connection_cache</a></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-call"><a href="#val-call" class="anchor"></a><code><span><span class="keyword">val</span> call : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="../../S/index.html#type-call">S.call</a></span></code></div><div class="spec-doc"><p>Process a request. Please see <code>call</code>.</p></div></div></details></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Make (cohttp-lwt.Cohttp_lwt.Connection_cache.Make)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">Connection_cache</a> » Make</nav><header class="odoc-preamble"><h1>Module <code><span>Connection_cache.Make</span></code></h1><p>This functor keeps a cache of connections for reuse. Connections are reused based on their remote <code>Conduit.endp</code> (effectively IP / port).</p></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#parameters">Parameters</a></li><li><a href="#signature">Signature</a></li></ul></nav></div><div class="odoc-content"><h2 id="parameters"><a href="#parameters" class="anchor"></a>Parameters</h2><div class="odoc-spec"><div class="spec parameter anchored" id="argument-1-Connection"><a href="#argument-1-Connection" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-1-Connection/index.html">Connection</a></span><span> : <a href="../../S/module-type-Connection/index.html">S.Connection</a></span></code></div></div><div class="odoc-spec"><div class="spec parameter anchored" id="argument-2-Sleep"><a href="#argument-2-Sleep" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-2-Sleep/index.html">Sleep</a></span><span> : <a href="../../S/module-type-Sleep/index.html">S.Sleep</a></span></code></div></div><h2 id="signature"><a href="#signature" class="anchor"></a>Signature</h2><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../S/module-type-Connection_cache/index.html">S.Connection_cache</a></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-call"><a href="#val-call" class="anchor"></a><code><span><span class="keyword">val</span> call : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="../../S/index.html#type-call">S.call</a></span></code></div><div class="spec-doc"><p>Process a request. Please see <code>call</code>.</p></div></div></details></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create :
|
||||
<span><span class="optlabel">?ctx</span>:<a href="argument-1-Connection/Net/index.html#type-ctx">Connection.Net.ctx</a> <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?keep</span>:int64 <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?retry</span>:int <span class="arrow">-></span></span>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp-lwt.Cohttp_lwt.Connection_cache.Make_no_cache.Connection.Net.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../../../index.html">Index</a> » <a href="../../../../../../index.html">cohttp-lwt</a> » <a href="../../../../../index.html">Cohttp_lwt</a> » <a href="../../../../index.html">Connection_cache</a> » <a href="../../../index.html">Make_no_cache</a> » <a href="../../index.html">Connection</a> » <a href="../index.html">Net</a> » IO</nav><header class="odoc-preamble"><h1>Module <code><span>Net.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp-lwt.Cohttp_lwt.Connection_cache.Make_no_cache.Connection.Net.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../../../index.html">Index</a> » <a href="../../../../../../index.html">cohttp-lwt</a> » <a href="../../../../../index.html">Cohttp_lwt</a> » <a href="../../../../index.html">Connection_cache</a> » <a href="../../../index.html">Make_no_cache</a> » <a href="../../index.html">Connection</a> » <a href="../index.html">Net</a> » IO</nav><header class="odoc-preamble"><h1>Module <code><span>Net.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<span><a href="#type-ic">ic</a> <span class="arrow">-></span></span>
|
||||
<span><span class="label">f</span>:<span>(<span>string <span class="arrow">-></span></span> <span><span class="label">pos</span>:int <span class="arrow">-></span></span> <span><span class="label">len</span>:int <span class="arrow">-></span></span> <span class="type-var">'a</span> * int)</span> <span class="arrow">-></span></span>
|
||||
<span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read_line"><a href="#val-read_line" class="anchor"></a><code><span><span class="keyword">val</span> read_line : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>string option</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read_line ic</code> will read a single line terminated by CR or CRLF from the input channel <code>ic</code>. It returns <code>None</code> if EOF or other error condition is reached.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read"><a href="#val-read" class="anchor"></a><code><span><span class="keyword">val</span> read : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span>int <span class="arrow">-></span></span> <span>string <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read ic len</code> will block until a maximum of <code>len</code> characters are read from the input channel <code>ic</code>. It returns an empty string if EOF or some other error condition occurs on the input channel, and can also return fewer than <code>len</code> characters if input buffering is not sufficient to satisfy the request.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-write"><a href="#val-write" class="anchor"></a><code><span><span class="keyword">val</span> write : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>string <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>write oc s</code> will block until the complete <code>s</code> string is written to the output channel <code>oc</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-flush"><a href="#val-flush" class="anchor"></a><code><span><span class="keyword">val</span> flush : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>flush oc</code> will return when all previously buffered content from calling <a href="#val-write"><code>write</code></a> have been written to the output channel <code>oc</code>.</p></div></div></details></div><div class="odoc-spec"><div class="spec type anchored" id="type-error"><a href="#type-error" class="anchor"></a><code><span><span class="keyword">type</span> error</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-catch"><a href="#val-catch" class="anchor"></a><code><span><span class="keyword">val</span> catch : <span><span>(<span>unit <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span><span>(<span class="type-var">'a</span>, <a href="#type-error">error</a>)</span> <a href="../../../../../../../ocaml/Stdlib/index.html#type-result">result</a></span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>catch f</code> is <code>f () >|= Result.ok</code>, unless <code>f</code> fails with an IO error, in which case it returns the error.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pp_error"><a href="#val-pp_error" class="anchor"></a><code><span><span class="keyword">val</span> pp_error : <span><a href="../../../../../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">-></span></span> <span><a href="#type-error">error</a> <span class="arrow">-></span></span> unit</span></code></div></div></div></body></html>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Connection (cohttp-lwt.Cohttp_lwt.Connection_cache.Make_no_cache.Connection)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../index.html">Index</a> » <a href="../../../../index.html">cohttp-lwt</a> » <a href="../../../index.html">Cohttp_lwt</a> » <a href="../../index.html">Connection_cache</a> » <a href="../index.html">Make_no_cache</a> » Connection</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make_no_cache.Connection</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Net"><a href="#module-Net" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Net/index.html">Net</a></span><span> : <a href="../../../S/module-type-Net/index.html">S.Net</a></span></code></div></div><div class="odoc-spec"><div class="spec exception anchored" id="exception-Retry"><a href="#exception-Retry" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Retry</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Connection (cohttp-lwt.Cohttp_lwt.Connection_cache.Make_no_cache.Connection)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../index.html">Index</a> » <a href="../../../../index.html">cohttp-lwt</a> » <a href="../../../index.html">Cohttp_lwt</a> » <a href="../../index.html">Connection_cache</a> » <a href="../index.html">Make_no_cache</a> » Connection</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make_no_cache.Connection</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Net"><a href="#module-Net" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Net/index.html">Net</a></span><span> : <a href="../../../S/module-type-Net/index.html">S.Net</a></span></code></div></div><div class="odoc-spec"><div class="spec exception anchored" id="exception-Retry"><a href="#exception-Retry" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Retry</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create :
|
||||
<span><span class="optlabel">?finalise</span>:<span>(<span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span>unit <a href="Net/IO/index.html#type-t">Net.IO.t</a></span>)</span> <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?persistent</span>:bool <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?ctx</span>:<a href="Net/index.html#type-ctx">Net.ctx</a> <span class="arrow">-></span></span>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Make_no_cache (cohttp-lwt.Cohttp_lwt.Connection_cache.Make_no_cache)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">Connection_cache</a> » Make_no_cache</nav><header class="odoc-preamble"><h1>Module <code><span>Connection_cache.Make_no_cache</span></code></h1><p>This functor establishes a new connection for each request.</p></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#parameters">Parameters</a></li><li><a href="#signature">Signature</a></li></ul></nav></div><div class="odoc-content"><h2 id="parameters"><a href="#parameters" class="anchor"></a>Parameters</h2><div class="odoc-spec"><div class="spec parameter anchored" id="argument-1-Connection"><a href="#argument-1-Connection" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-1-Connection/index.html">Connection</a></span><span> : <a href="../../S/module-type-Connection/index.html">S.Connection</a></span></code></div></div><h2 id="signature"><a href="#signature" class="anchor"></a>Signature</h2><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../S/module-type-Connection_cache/index.html">S.Connection_cache</a></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-call"><a href="#val-call" class="anchor"></a><code><span><span class="keyword">val</span> call : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="../../S/index.html#type-call">S.call</a></span></code></div><div class="spec-doc"><p>Process a request. Please see <code>call</code>.</p></div></div></details></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create : <span><span class="optlabel">?ctx</span>:<a href="argument-1-Connection/Net/index.html#type-ctx">Connection.Net.ctx</a> <span class="arrow">-></span></span> <span>unit <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p><code>create ?ctx ()</code> creates a connection for handling a single request. The connection accepts only a single request and will automatically be closed as soon as possible.</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">ctx</span> <p>See <a href="argument-1-Connection/Net/index.html#type-ctx"><code>Connection.Net.ctx</code></a></p></li></ul></div></div></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Make_no_cache (cohttp-lwt.Cohttp_lwt.Connection_cache.Make_no_cache)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">Connection_cache</a> » Make_no_cache</nav><header class="odoc-preamble"><h1>Module <code><span>Connection_cache.Make_no_cache</span></code></h1><p>This functor establishes a new connection for each request.</p></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#parameters">Parameters</a></li><li><a href="#signature">Signature</a></li></ul></nav></div><div class="odoc-content"><h2 id="parameters"><a href="#parameters" class="anchor"></a>Parameters</h2><div class="odoc-spec"><div class="spec parameter anchored" id="argument-1-Connection"><a href="#argument-1-Connection" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-1-Connection/index.html">Connection</a></span><span> : <a href="../../S/module-type-Connection/index.html">S.Connection</a></span></code></div></div><h2 id="signature"><a href="#signature" class="anchor"></a>Signature</h2><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../S/module-type-Connection_cache/index.html">S.Connection_cache</a></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-call"><a href="#val-call" class="anchor"></a><code><span><span class="keyword">val</span> call : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="../../S/index.html#type-call">S.call</a></span></code></div><div class="spec-doc"><p>Process a request. Please see <code>call</code>.</p></div></div></details></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create : <span><span class="optlabel">?ctx</span>:<a href="argument-1-Connection/Net/index.html#type-ctx">Connection.Net.ctx</a> <span class="arrow">-></span></span> <span>unit <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p><code>create ?ctx ()</code> creates a connection for handling a single request. The connection accepts only a single request and will automatically be closed as soon as possible.</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">ctx</span> <p>See <a href="argument-1-Connection/Net/index.html#type-ctx"><code>Connection.Net.ctx</code></a></p></li></ul></div></div></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp-lwt.Cohttp_lwt.Connection_cache.Make_proxy.Connection.Net.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../../../index.html">Index</a> » <a href="../../../../../../index.html">cohttp-lwt</a> » <a href="../../../../../index.html">Cohttp_lwt</a> » <a href="../../../../index.html">Connection_cache</a> » <a href="../../../index.html">Make_proxy</a> » <a href="../../index.html">Connection</a> » <a href="../index.html">Net</a> » IO</nav><header class="odoc-preamble"><h1>Module <code><span>Net.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp-lwt.Cohttp_lwt.Connection_cache.Make_proxy.Connection.Net.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../../../index.html">Index</a> » <a href="../../../../../../index.html">cohttp-lwt</a> » <a href="../../../../../index.html">Cohttp_lwt</a> » <a href="../../../../index.html">Connection_cache</a> » <a href="../../../index.html">Make_proxy</a> » <a href="../../index.html">Connection</a> » <a href="../index.html">Net</a> » IO</nav><header class="odoc-preamble"><h1>Module <code><span>Net.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<span><a href="#type-ic">ic</a> <span class="arrow">-></span></span>
|
||||
<span><span class="label">f</span>:<span>(<span>string <span class="arrow">-></span></span> <span><span class="label">pos</span>:int <span class="arrow">-></span></span> <span><span class="label">len</span>:int <span class="arrow">-></span></span> <span class="type-var">'a</span> * int)</span> <span class="arrow">-></span></span>
|
||||
<span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read_line"><a href="#val-read_line" class="anchor"></a><code><span><span class="keyword">val</span> read_line : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>string option</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read_line ic</code> will read a single line terminated by CR or CRLF from the input channel <code>ic</code>. It returns <code>None</code> if EOF or other error condition is reached.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read"><a href="#val-read" class="anchor"></a><code><span><span class="keyword">val</span> read : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span>int <span class="arrow">-></span></span> <span>string <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read ic len</code> will block until a maximum of <code>len</code> characters are read from the input channel <code>ic</code>. It returns an empty string if EOF or some other error condition occurs on the input channel, and can also return fewer than <code>len</code> characters if input buffering is not sufficient to satisfy the request.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-write"><a href="#val-write" class="anchor"></a><code><span><span class="keyword">val</span> write : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>string <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>write oc s</code> will block until the complete <code>s</code> string is written to the output channel <code>oc</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-flush"><a href="#val-flush" class="anchor"></a><code><span><span class="keyword">val</span> flush : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>flush oc</code> will return when all previously buffered content from calling <a href="#val-write"><code>write</code></a> have been written to the output channel <code>oc</code>.</p></div></div></details></div><div class="odoc-spec"><div class="spec type anchored" id="type-error"><a href="#type-error" class="anchor"></a><code><span><span class="keyword">type</span> error</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-catch"><a href="#val-catch" class="anchor"></a><code><span><span class="keyword">val</span> catch : <span><span>(<span>unit <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span><span>(<span class="type-var">'a</span>, <a href="#type-error">error</a>)</span> <a href="../../../../../../../ocaml/Stdlib/index.html#type-result">result</a></span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>catch f</code> is <code>f () >|= Result.ok</code>, unless <code>f</code> fails with an IO error, in which case it returns the error.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pp_error"><a href="#val-pp_error" class="anchor"></a><code><span><span class="keyword">val</span> pp_error : <span><a href="../../../../../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">-></span></span> <span><a href="#type-error">error</a> <span class="arrow">-></span></span> unit</span></code></div></div></div></body></html>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Connection (cohttp-lwt.Cohttp_lwt.Connection_cache.Make_proxy.Connection)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../index.html">Index</a> » <a href="../../../../index.html">cohttp-lwt</a> » <a href="../../../index.html">Cohttp_lwt</a> » <a href="../../index.html">Connection_cache</a> » <a href="../index.html">Make_proxy</a> » Connection</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make_proxy.Connection</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Net"><a href="#module-Net" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Net/index.html">Net</a></span><span> : <a href="../../../S/module-type-Net/index.html">S.Net</a></span></code></div></div><div class="odoc-spec"><div class="spec exception anchored" id="exception-Retry"><a href="#exception-Retry" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Retry</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Connection (cohttp-lwt.Cohttp_lwt.Connection_cache.Make_proxy.Connection)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../index.html">Index</a> » <a href="../../../../index.html">cohttp-lwt</a> » <a href="../../../index.html">Cohttp_lwt</a> » <a href="../../index.html">Connection_cache</a> » <a href="../index.html">Make_proxy</a> » Connection</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make_proxy.Connection</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Net"><a href="#module-Net" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Net/index.html">Net</a></span><span> : <a href="../../../S/module-type-Net/index.html">S.Net</a></span></code></div></div><div class="odoc-spec"><div class="spec exception anchored" id="exception-Retry"><a href="#exception-Retry" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Retry</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create :
|
||||
<span><span class="optlabel">?finalise</span>:<span>(<span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span>unit <a href="Net/IO/index.html#type-t">Net.IO.t</a></span>)</span> <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?persistent</span>:bool <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?ctx</span>:<a href="Net/index.html#type-ctx">Net.ctx</a> <span class="arrow">-></span></span>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Sleep (cohttp-lwt.Cohttp_lwt.Connection_cache.Make_proxy.Sleep)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../index.html">Index</a> » <a href="../../../../index.html">cohttp-lwt</a> » <a href="../../../index.html">Cohttp_lwt</a> » <a href="../../index.html">Connection_cache</a> » <a href="../index.html">Make_proxy</a> » Sleep</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make_proxy.Sleep</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-sleep_ns"><a href="#val-sleep_ns" class="anchor"></a><code><span><span class="keyword">val</span> sleep_ns : <span>int64 <span class="arrow">-></span></span> <span>unit <a href="../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div></div></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Sleep (cohttp-lwt.Cohttp_lwt.Connection_cache.Make_proxy.Sleep)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../index.html">Index</a> » <a href="../../../../index.html">cohttp-lwt</a> » <a href="../../../index.html">Cohttp_lwt</a> » <a href="../../index.html">Connection_cache</a> » <a href="../index.html">Make_proxy</a> » Sleep</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make_proxy.Sleep</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-sleep_ns"><a href="#val-sleep_ns" class="anchor"></a><code><span><span class="keyword">val</span> sleep_ns : <span>int64 <span class="arrow">-></span></span> <span>unit <a href="../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div></div></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Make_proxy (cohttp-lwt.Cohttp_lwt.Connection_cache.Make_proxy)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">Connection_cache</a> » Make_proxy</nav><header class="odoc-preamble"><h1>Module <code><span>Connection_cache.Make_proxy</span></code></h1><p>This functor keeps a cache of connections for reuse. Connections are reused based on their remote <code>Conduit.endp</code> (effectively IP / port). It also supports automatically connecting and reconnecting to direct and tunneling proxies, based on the remote URI scheme (HTTP will select direct proxies, HTTPS tunneling proxies).</p></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#parameters">Parameters</a></li><li><a href="#signature">Signature</a></li></ul></nav></div><div class="odoc-content"><h2 id="parameters"><a href="#parameters" class="anchor"></a>Parameters</h2><div class="odoc-spec"><div class="spec parameter anchored" id="argument-1-Connection"><a href="#argument-1-Connection" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-1-Connection/index.html">Connection</a></span><span> : <a href="../../S/module-type-Connection/index.html">S.Connection</a></span></code></div></div><div class="odoc-spec"><div class="spec parameter anchored" id="argument-2-Sleep"><a href="#argument-2-Sleep" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-2-Sleep/index.html">Sleep</a></span><span> : <a href="../../S/module-type-Sleep/index.html">S.Sleep</a></span></code></div></div><h2 id="signature"><a href="#signature" class="anchor"></a>Signature</h2><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../S/module-type-Connection_cache/index.html">S.Connection_cache</a></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-call"><a href="#val-call" class="anchor"></a><code><span><span class="keyword">val</span> call : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="../../S/index.html#type-call">S.call</a></span></code></div><div class="spec-doc"><p>Process a request. Please see <code>call</code>.</p></div></div></details></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Make_proxy (cohttp-lwt.Cohttp_lwt.Connection_cache.Make_proxy)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">Connection_cache</a> » Make_proxy</nav><header class="odoc-preamble"><h1>Module <code><span>Connection_cache.Make_proxy</span></code></h1><p>This functor keeps a cache of connections for reuse. Connections are reused based on their remote <code>Conduit.endp</code> (effectively IP / port). It also supports automatically connecting and reconnecting to direct and tunneling proxies, based on the remote URI scheme (HTTP will select direct proxies, HTTPS tunneling proxies).</p></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#parameters">Parameters</a></li><li><a href="#signature">Signature</a></li></ul></nav></div><div class="odoc-content"><h2 id="parameters"><a href="#parameters" class="anchor"></a>Parameters</h2><div class="odoc-spec"><div class="spec parameter anchored" id="argument-1-Connection"><a href="#argument-1-Connection" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-1-Connection/index.html">Connection</a></span><span> : <a href="../../S/module-type-Connection/index.html">S.Connection</a></span></code></div></div><div class="odoc-spec"><div class="spec parameter anchored" id="argument-2-Sleep"><a href="#argument-2-Sleep" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-2-Sleep/index.html">Sleep</a></span><span> : <a href="../../S/module-type-Sleep/index.html">S.Sleep</a></span></code></div></div><h2 id="signature"><a href="#signature" class="anchor"></a>Signature</h2><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../S/module-type-Connection_cache/index.html">S.Connection_cache</a></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-call"><a href="#val-call" class="anchor"></a><code><span><span class="keyword">val</span> call : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="../../S/index.html#type-call">S.call</a></span></code></div><div class="spec-doc"><p>Process a request. Please see <code>call</code>.</p></div></div></details></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create :
|
||||
<span><span class="optlabel">?ctx</span>:<a href="argument-1-Connection/Net/index.html#type-ctx">Connection.Net.ctx</a> <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?keep</span>:int64 <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?retry</span>:int <span class="arrow">-></span></span>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Connection_cache (cohttp-lwt.Cohttp_lwt.Connection_cache)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cohttp-lwt</a> » <a href="../index.html">Cohttp_lwt</a> » Connection_cache</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt.Connection_cache</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Make_no_cache"><a href="#module-Make_no_cache" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Make_no_cache/index.html">Make_no_cache</a></span><span> (<a href="Make_no_cache/argument-1-Connection/index.html">Connection</a> : <a href="../S/module-type-Connection/index.html">S.Connection</a>) : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>This functor establishes a new connection for each request.</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Make"><a href="#module-Make" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Make/index.html">Make</a></span><span> (<a href="Make/argument-1-Connection/index.html">Connection</a> : <a href="../S/module-type-Connection/index.html">S.Connection</a>) (<a href="Make/argument-2-Sleep/index.html">Sleep</a> : <a href="../S/module-type-Sleep/index.html">S.Sleep</a>) : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>This functor keeps a cache of connections for reuse. Connections are reused based on their remote <code>Conduit.endp</code> (effectively IP / port).</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Make_proxy"><a href="#module-Make_proxy" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Make_proxy/index.html">Make_proxy</a></span><span> (<a href="Make_proxy/argument-1-Connection/index.html">Connection</a> : <a href="../S/module-type-Connection/index.html">S.Connection</a>) (<a href="Make_proxy/argument-2-Sleep/index.html">Sleep</a> : <a href="../S/module-type-Sleep/index.html">S.Sleep</a>) : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>This functor keeps a cache of connections for reuse. Connections are reused based on their remote <code>Conduit.endp</code> (effectively IP / port). It also supports automatically connecting and reconnecting to direct and tunneling proxies, based on the remote URI scheme (HTTP will select direct proxies, HTTPS tunneling proxies).</p></div></div></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Connection_cache (cohttp-lwt.Cohttp_lwt.Connection_cache)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cohttp-lwt</a> » <a href="../index.html">Cohttp_lwt</a> » Connection_cache</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt.Connection_cache</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Make_no_cache"><a href="#module-Make_no_cache" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Make_no_cache/index.html">Make_no_cache</a></span><span> (<a href="Make_no_cache/argument-1-Connection/index.html">Connection</a> : <a href="../S/module-type-Connection/index.html">S.Connection</a>) : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>This functor establishes a new connection for each request.</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Make"><a href="#module-Make" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Make/index.html">Make</a></span><span> (<a href="Make/argument-1-Connection/index.html">Connection</a> : <a href="../S/module-type-Connection/index.html">S.Connection</a>) (<a href="Make/argument-2-Sleep/index.html">Sleep</a> : <a href="../S/module-type-Sleep/index.html">S.Sleep</a>) : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>This functor keeps a cache of connections for reuse. Connections are reused based on their remote <code>Conduit.endp</code> (effectively IP / port).</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Make_proxy"><a href="#module-Make_proxy" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Make_proxy/index.html">Make_proxy</a></span><span> (<a href="Make_proxy/argument-1-Connection/index.html">Connection</a> : <a href="../S/module-type-Connection/index.html">S.Connection</a>) (<a href="Make_proxy/argument-2-Sleep/index.html">Sleep</a> : <a href="../S/module-type-Sleep/index.html">S.Sleep</a>) : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>This functor keeps a cache of connections for reuse. Connections are reused based on their remote <code>Conduit.endp</code> (effectively IP / port). It also supports automatically connecting and reconnecting to direct and tunneling proxies, based on the remote URI scheme (HTTP will select direct proxies, HTTPS tunneling proxies).</p></div></div></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp-lwt.Cohttp_lwt.Make_client.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">Make_client</a> » IO</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make_client.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp-lwt.Cohttp_lwt.Make_client.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">Make_client</a> » IO</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make_client.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<span><a href="#type-ic">ic</a> <span class="arrow">-></span></span>
|
||||
<span><span class="label">f</span>:<span>(<span>string <span class="arrow">-></span></span> <span><span class="label">pos</span>:int <span class="arrow">-></span></span> <span><span class="label">len</span>:int <span class="arrow">-></span></span> <span class="type-var">'a</span> * int)</span> <span class="arrow">-></span></span>
|
||||
<span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read_line"><a href="#val-read_line" class="anchor"></a><code><span><span class="keyword">val</span> read_line : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>string option</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read_line ic</code> will read a single line terminated by CR or CRLF from the input channel <code>ic</code>. It returns <code>None</code> if EOF or other error condition is reached.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read"><a href="#val-read" class="anchor"></a><code><span><span class="keyword">val</span> read : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span>int <span class="arrow">-></span></span> <span>string <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read ic len</code> will block until a maximum of <code>len</code> characters are read from the input channel <code>ic</code>. It returns an empty string if EOF or some other error condition occurs on the input channel, and can also return fewer than <code>len</code> characters if input buffering is not sufficient to satisfy the request.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-write"><a href="#val-write" class="anchor"></a><code><span><span class="keyword">val</span> write : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>string <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>write oc s</code> will block until the complete <code>s</code> string is written to the output channel <code>oc</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-flush"><a href="#val-flush" class="anchor"></a><code><span><span class="keyword">val</span> flush : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>flush oc</code> will return when all previously buffered content from calling <a href="#val-write"><code>write</code></a> have been written to the output channel <code>oc</code>.</p></div></div></details></div><div class="odoc-spec"><div class="spec type anchored" id="type-error"><a href="#type-error" class="anchor"></a><code><span><span class="keyword">type</span> error</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-catch"><a href="#val-catch" class="anchor"></a><code><span><span class="keyword">val</span> catch : <span><span>(<span>unit <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span><span>(<span class="type-var">'a</span>, <a href="#type-error">error</a>)</span> <a href="../../../../ocaml/Stdlib/index.html#type-result">result</a></span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>catch f</code> is <code>f () >|= Result.ok</code>, unless <code>f</code> fails with an IO error, in which case it returns the error.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pp_error"><a href="#val-pp_error" class="anchor"></a><code><span><span class="keyword">val</span> pp_error : <span><a href="../../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">-></span></span> <span><a href="#type-error">error</a> <span class="arrow">-></span></span> unit</span></code></div></div></div></body></html>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Make_client (cohttp-lwt.Cohttp_lwt.Make_client)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cohttp-lwt</a> » <a href="../index.html">Cohttp_lwt</a> » Make_client</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt.Make_client</span></code></h1><ul class="at-tags"><li class="deprecated"><span class="at-tag">deprecated</span> <p>use <a href="../Client/Make/index.html"><code>Client.Make</code></a> instead.</p></li></ul></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#parameters">Parameters</a></li><li><a href="#signature">Signature</a></li></ul></nav></div><div class="odoc-content"><h2 id="parameters"><a href="#parameters" class="anchor"></a>Parameters</h2><div class="odoc-spec"><div class="spec parameter anchored" id="argument-1-IO"><a href="#argument-1-IO" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-1-IO/index.html">IO</a></span><span> : <a href="../S/module-type-IO/index.html">IO</a></span></code></div></div><div class="odoc-spec"><div class="spec parameter anchored" id="argument-2-Net"><a href="#argument-2-Net" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-2-Net/index.html">Net</a></span><span> : <a href="../S/module-type-Net/index.html">S.Net</a> <span class="keyword">with</span> <span><span class="keyword">module</span> <a href="../S/module-type-Net/IO/index.html">IO</a> = <a href="argument-1-IO/index.html">IO</a></span></span></code></div></div><h2 id="signature"><a href="#signature" class="anchor"></a>Signature</h2><div class="odoc-spec"><div class="spec type anchored" id="type-ctx"><a href="#type-ctx" class="anchor"></a><code><span><span class="keyword">type</span> ctx</span><span> = <a href="argument-2-Net/index.html#type-ctx">Connection.Make(Net).Net.ctx</a></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-io"><a href="#type-io" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a io</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-with_context"><a href="#type-with_context" class="anchor"></a><code><span><span class="keyword">type</span> <span>!'a with_context</span></span><span> = <span><span class="optlabel">?ctx</span>:<a href="#type-ctx">ctx</a> <span class="arrow">-></span></span> <span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-body"><a href="#type-body" class="anchor"></a><code><span><span class="keyword">type</span> body</span><span> = <a href="../Body/index.html#type-t">Body.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-map_context"><a href="#val-map_context" class="anchor"></a><code><span><span class="keyword">val</span> map_context : <span><span><span class="type-var">'a</span> <a href="#type-with_context">with_context</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span class="type-var">'b</span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-with_context">with_context</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-call"><a href="#val-call" class="anchor"></a><code><span><span class="keyword">val</span> call :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Make_client (cohttp-lwt.Cohttp_lwt.Make_client)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cohttp-lwt</a> » <a href="../index.html">Cohttp_lwt</a> » Make_client</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt.Make_client</span></code></h1><ul class="at-tags"><li class="deprecated"><span class="at-tag">deprecated</span> <p>use <a href="../Client/Make/index.html"><code>Client.Make</code></a> instead.</p></li></ul></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#parameters">Parameters</a></li><li><a href="#signature">Signature</a></li></ul></nav></div><div class="odoc-content"><h2 id="parameters"><a href="#parameters" class="anchor"></a>Parameters</h2><div class="odoc-spec"><div class="spec parameter anchored" id="argument-1-IO"><a href="#argument-1-IO" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-1-IO/index.html">IO</a></span><span> : <a href="../S/module-type-IO/index.html">IO</a></span></code></div></div><div class="odoc-spec"><div class="spec parameter anchored" id="argument-2-Net"><a href="#argument-2-Net" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-2-Net/index.html">Net</a></span><span> : <a href="../S/module-type-Net/index.html">S.Net</a> <span class="keyword">with</span> <span><span class="keyword">module</span> <a href="../S/module-type-Net/IO/index.html">IO</a> = <a href="argument-1-IO/index.html">IO</a></span></span></code></div></div><h2 id="signature"><a href="#signature" class="anchor"></a>Signature</h2><div class="odoc-spec"><div class="spec type anchored" id="type-ctx"><a href="#type-ctx" class="anchor"></a><code><span><span class="keyword">type</span> ctx</span><span> = <a href="argument-2-Net/index.html#type-ctx">Connection.Make(Net).Net.ctx</a></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-io"><a href="#type-io" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a io</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-with_context"><a href="#type-with_context" class="anchor"></a><code><span><span class="keyword">type</span> <span>!'a with_context</span></span><span> = <span><span class="optlabel">?ctx</span>:<a href="#type-ctx">ctx</a> <span class="arrow">-></span></span> <span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-body"><a href="#type-body" class="anchor"></a><code><span><span class="keyword">type</span> body</span><span> = <a href="../Body/index.html#type-t">Body.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-map_context"><a href="#val-map_context" class="anchor"></a><code><span><span class="keyword">val</span> map_context : <span><span><span class="type-var">'a</span> <a href="#type-with_context">with_context</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span class="type-var">'b</span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-with_context">with_context</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-call"><a href="#val-call" class="anchor"></a><code><span><span class="keyword">val</span> call :
|
||||
<span><span>(<span><span class="optlabel">?headers</span>:<a href="../../../http/Http/Header/index.html#type-t">Http.Header.t</a> <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?body</span>:<a href="#type-body">body</a> <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?chunked</span>:bool <span class="arrow">-></span></span>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Bytebuffer (cohttp-lwt.Cohttp_lwt.Private.Bytebuffer)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">Private</a> » Bytebuffer</nav><header class="odoc-preamble"><h1>Module <code><span>Private.Bytebuffer</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <span class="keyword">module</span> <span class="keyword">type</span> <span class="keyword">of</span> <span class="keyword">struct</span> <span class="keyword">include</span> <span class="xref-unresolved">Http_bytebuffer</span>.Bytebuffer <span class="keyword">end</span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span><span> = <span class="xref-unresolved">Http_bytebuffer__Bytebuffer</span>.t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create : <span>int <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-unsafe_buf"><a href="#val-unsafe_buf" class="anchor"></a><code><span><span class="keyword">val</span> unsafe_buf : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="../../../../ocaml/Stdlib/Bytes/index.html#type-t">Stdlib.Bytes.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pos"><a href="#val-pos" class="anchor"></a><code><span><span class="keyword">val</span> pos : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> int</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-compact"><a href="#val-compact" class="anchor"></a><code><span><span class="keyword">val</span> compact : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-length"><a href="#val-length" class="anchor"></a><code><span><span class="keyword">val</span> length : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> int</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-drop"><a href="#val-drop" class="anchor"></a><code><span><span class="keyword">val</span> drop : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span>int <span class="arrow">-></span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-to_string"><a href="#val-to_string" class="anchor"></a><code><span><span class="keyword">val</span> to_string : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> string</span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Make"><a href="#module-Make" class="anchor"></a><code><span><span class="keyword">module</span> Make</span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div></details></div><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></summary><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Bytebuffer (cohttp-lwt.Cohttp_lwt.Private.Bytebuffer)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">Private</a> » Bytebuffer</nav><header class="odoc-preamble"><h1>Module <code><span>Private.Bytebuffer</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <span class="keyword">module</span> <span class="keyword">type</span> <span class="keyword">of</span> <span class="keyword">struct</span> <span class="keyword">include</span> <span class="xref-unresolved">Http_bytebuffer</span>.Bytebuffer <span class="keyword">end</span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span><span> = <span class="xref-unresolved">Http_bytebuffer__Bytebuffer</span>.t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create : <span>int <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-unsafe_buf"><a href="#val-unsafe_buf" class="anchor"></a><code><span><span class="keyword">val</span> unsafe_buf : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="../../../../ocaml/Stdlib/Bytes/index.html#type-t">Stdlib.Bytes.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pos"><a href="#val-pos" class="anchor"></a><code><span><span class="keyword">val</span> pos : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> int</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-compact"><a href="#val-compact" class="anchor"></a><code><span><span class="keyword">val</span> compact : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-length"><a href="#val-length" class="anchor"></a><code><span><span class="keyword">val</span> length : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> int</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-drop"><a href="#val-drop" class="anchor"></a><code><span><span class="keyword">val</span> drop : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span>int <span class="arrow">-></span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-to_string"><a href="#val-to_string" class="anchor"></a><code><span><span class="keyword">val</span> to_string : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> string</span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Make"><a href="#module-Make" class="anchor"></a><code><span><span class="keyword">module</span> Make</span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div></details></div><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></summary><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill :
|
||||
<span><span class="xref-unresolved">Http_bytebuffer__Bytebuffer</span>.t <span class="arrow">-></span></span>
|
||||
<span><span>(<span>bytes <span class="arrow">-></span></span> <span><span class="label">pos</span>:int <span class="arrow">-></span></span> <span><span class="label">len</span>:int <span class="arrow">-></span></span> <span><span>[ `Eof <span><span>| `Ok</span> of int</span> ]</span> <a href="../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span>)</span> <span class="arrow">-></span></span>
|
||||
<span><span>[ `Eof <span>| `Ok</span> ]</span> <a href="../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read_line"><a href="#val-read_line" class="anchor"></a><code><span><span class="keyword">val</span> read_line :
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>String_io (cohttp-lwt.Cohttp_lwt.Private.String_io)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">Private</a> » String_io</nav><header class="odoc-preamble"><h1>Module <code><span>Private.String_io</span></code></h1><p>Lwt IO implementation that uses strings to marshal and unmarshal HTTP</p></header><div class="odoc-content"><div class="odoc-include"><div class="spec-doc"><p>IO interface that uses <a href="../../../../cohttp/Cohttp/Private/String_io/index.html#type-buf"><code>Cohttp.Private.String_io.buf</code></a> for input data and queues output data into a <code>Buffer.t</code>. Never actually blocks despite the Lwt use, although a future revision may yield when parsing large strings.</p></div><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>String_io (cohttp-lwt.Cohttp_lwt.Private.String_io)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">Private</a> » String_io</nav><header class="odoc-preamble"><h1>Module <code><span>Private.String_io</span></code></h1><p>Lwt IO implementation that uses strings to marshal and unmarshal HTTP</p></header><div class="odoc-content"><div class="odoc-include"><div class="spec-doc"><p>IO interface that uses <a href="../../../../cohttp/Cohttp/Private/String_io/index.html#type-buf"><code>Cohttp.Private.String_io.buf</code></a> for input data and queues output data into a <code>Buffer.t</code>. Never actually blocks despite the Lwt use, although a future revision may yield when parsing large strings.</p></div><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a>
|
||||
<span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span>
|
||||
<span class="keyword">and</span> <span><span class="keyword">type</span> <a href="../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-ic">ic</a> = <a href="../../../../cohttp/Cohttp/Private/String_io/index.html#type-buf">Cohttp.Private.String_io.buf</a></span>
|
||||
<span class="keyword">and</span> <span><span class="keyword">type</span> <a href="../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-oc">oc</a> = <a href="../../../../ocaml/Stdlib/Buffer/index.html#type-t">Stdlib.Buffer.t</a></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span><span> = <a href="../../../../cohttp/Cohttp/Private/String_io/index.html#type-buf">Cohttp.Private.String_io.buf</a></span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span><span> = <a href="../../../../ocaml/Stdlib/Buffer/index.html#type-t">Stdlib.Buffer.t</a></span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Private (cohttp-lwt.Cohttp_lwt.Private)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cohttp-lwt</a> » <a href="../index.html">Cohttp_lwt</a> » Private</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt.Private</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Bytebuffer"><a href="#module-Bytebuffer" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Bytebuffer/index.html">Bytebuffer</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-String_io"><a href="#module-String_io" class="anchor"></a><code><span><span class="keyword">module</span> <a href="String_io/index.html">String_io</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Lwt IO implementation that uses strings to marshal and unmarshal HTTP</p></div></div></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Private (cohttp-lwt.Cohttp_lwt.Private)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cohttp-lwt</a> » <a href="../index.html">Cohttp_lwt</a> » Private</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt.Private</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Bytebuffer"><a href="#module-Bytebuffer" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Bytebuffer/index.html">Bytebuffer</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-String_io"><a href="#module-String_io" class="anchor"></a><code><span><span class="keyword">module</span> <a href="String_io/index.html">String_io</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Lwt IO implementation that uses strings to marshal and unmarshal HTTP</p></div></div></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>S (cohttp-lwt.Cohttp_lwt.S)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cohttp-lwt</a> » <a href="../index.html">Cohttp_lwt</a> » S</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt.S</span></code></h1><p>Portable Lwt implementation of HTTP client and server, without depending on a particular I/O implementation. The various <code>Make</code> functors must be instantiated by an implementation that provides a concrete IO monad.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module-type anchored" id="module-type-IO"><a href="#module-type-IO" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-IO/index.html">IO</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>The IO module is specialized for the <code>Lwt</code> monad.</p></div></div><div class="odoc-spec"><div class="spec module-type anchored" id="module-type-Net"><a href="#module-type-Net" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-Net/index.html">Net</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>The <code>Net</code> module type defines how to connect to a remote node and close the resulting channels to clean up.</p></div></div><div class="odoc-spec"><div class="spec module-type anchored" id="module-type-Sleep"><a href="#module-type-Sleep" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-Sleep/index.html">Sleep</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>This is compatible with <code>Mirage_time.S</code>. It may be satisfied by mirage-time-unix <code>Time</code> or <code>Mirage_time</code>.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-call"><a href="#type-call" class="anchor"></a><code><span><span class="keyword">type</span> call</span><span> =
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>S (cohttp-lwt.Cohttp_lwt.S)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cohttp-lwt</a> » <a href="../index.html">Cohttp_lwt</a> » S</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt.S</span></code></h1><p>Portable Lwt implementation of HTTP client and server, without depending on a particular I/O implementation. The various <code>Make</code> functors must be instantiated by an implementation that provides a concrete IO monad.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module-type anchored" id="module-type-IO"><a href="#module-type-IO" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-IO/index.html">IO</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>The IO module is specialized for the <code>Lwt</code> monad.</p></div></div><div class="odoc-spec"><div class="spec module-type anchored" id="module-type-Net"><a href="#module-type-Net" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-Net/index.html">Net</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>The <code>Net</code> module type defines how to connect to a remote node and close the resulting channels to clean up.</p></div></div><div class="odoc-spec"><div class="spec module-type anchored" id="module-type-Sleep"><a href="#module-type-Sleep" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-Sleep/index.html">Sleep</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>This is compatible with <code>Mirage_time.S</code>. It may be satisfied by mirage-time-unix <code>Time</code> or <code>Mirage_time</code>.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-call"><a href="#type-call" class="anchor"></a><code><span><span class="keyword">type</span> call</span><span> =
|
||||
<span><span class="optlabel">?headers</span>:<a href="../../../http/Http/Header/index.html#type-t">Http.Header.t</a> <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?body</span>:<a href="../Body/index.html#type-t">Body.t</a> <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?absolute_form</span>:bool <span class="arrow">-></span></span>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Client (cohttp-lwt.Cohttp_lwt.S.Client)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">S</a> » Client</nav><header class="odoc-preamble"><h1>Module type <code><span>S.Client</span></code></h1><p>The <code>Client</code> module is a collection of convenience functions for constructing and processing requests.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-ctx"><a href="#type-ctx" class="anchor"></a><code><span><span class="keyword">type</span> ctx</span></code></div></div><div class="odoc-include"><div class="spec-doc"><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">ctx</span> <p>If provided, no connection cache is used, but <code>Connection_cache.Make_no_cache.create</code> is used to resolve uri and create a dedicated connection with <code>ctx</code>.</p></li></ul><p>In most cases you should use the more specific helper calls in the interface rather than invoke this function directly. See <a href="#val-head"><code>head</code></a>, <a href="#val-get"><code>get</code></a> and <a href="#val-post"><code>post</code></a> for some examples.</p></div><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../cohttp/Cohttp/Generic/Client/module-type-S/index.html">Cohttp.Generic.Client.S</a>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Client (cohttp-lwt.Cohttp_lwt.S.Client)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">S</a> » Client</nav><header class="odoc-preamble"><h1>Module type <code><span>S.Client</span></code></h1><p>The <code>Client</code> module is a collection of convenience functions for constructing and processing requests.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-ctx"><a href="#type-ctx" class="anchor"></a><code><span><span class="keyword">type</span> ctx</span></code></div></div><div class="odoc-include"><div class="spec-doc"><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">ctx</span> <p>If provided, no connection cache is used, but <code>Connection_cache.Make_no_cache.create</code> is used to resolve uri and create a dedicated connection with <code>ctx</code>.</p></li></ul><p>In most cases you should use the more specific helper calls in the interface rather than invoke this function directly. See <a href="#val-head"><code>head</code></a>, <a href="#val-get"><code>get</code></a> and <a href="#val-post"><code>post</code></a> for some examples.</p></div><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../cohttp/Cohttp/Generic/Client/module-type-S/index.html">Cohttp.Generic.Client.S</a>
|
||||
<span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../cohttp/Cohttp/Generic/Client/module-type-S/index.html#type-io">io</a></span> = <span><span class="type-var">'a</span> <a href="../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span>
|
||||
<span class="keyword">and</span> <span><span class="keyword">type</span> <a href="../../../../cohttp/Cohttp/Generic/Client/module-type-S/index.html#type-body">body</a> = <a href="../../Body/index.html#type-t">Body.t</a></span>
|
||||
<span class="keyword">and</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../cohttp/Cohttp/Generic/Client/module-type-S/index.html#type-with_context">with_context</a></span> = <span><span class="optlabel">?ctx</span>:<a href="#type-ctx">ctx</a> <span class="arrow">-></span></span> <span class="type-var">'a</span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-io"><a href="#type-io" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a io</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-with_context"><a href="#type-with_context" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a with_context</span></span><span> = <span><span class="optlabel">?ctx</span>:<a href="#type-ctx">ctx</a> <span class="arrow">-></span></span> <span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-body"><a href="#type-body" class="anchor"></a><code><span><span class="keyword">type</span> body</span><span> = <a href="../../Body/index.html#type-t">Body.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-map_context"><a href="#val-map_context" class="anchor"></a><code><span><span class="keyword">val</span> map_context : <span><span><span class="type-var">'a</span> <a href="#type-with_context">with_context</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span class="type-var">'b</span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-with_context">with_context</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-call"><a href="#val-call" class="anchor"></a><code><span><span class="keyword">val</span> call :
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp-lwt.Cohttp_lwt.S.Connection.Net.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../../index.html">Index</a> » <a href="../../../../../index.html">cohttp-lwt</a> » <a href="../../../../index.html">Cohttp_lwt</a> » <a href="../../../index.html">S</a> » <a href="../../index.html">Connection</a> » <a href="../index.html">Net</a> » IO</nav><header class="odoc-preamble"><h1>Module <code><span>Net.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp-lwt.Cohttp_lwt.S.Connection.Net.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../../index.html">Index</a> » <a href="../../../../../index.html">cohttp-lwt</a> » <a href="../../../../index.html">Cohttp_lwt</a> » <a href="../../../index.html">S</a> » <a href="../../index.html">Connection</a> » <a href="../index.html">Net</a> » IO</nav><header class="odoc-preamble"><h1>Module <code><span>Net.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<span><a href="#type-ic">ic</a> <span class="arrow">-></span></span>
|
||||
<span><span class="label">f</span>:<span>(<span>string <span class="arrow">-></span></span> <span><span class="label">pos</span>:int <span class="arrow">-></span></span> <span><span class="label">len</span>:int <span class="arrow">-></span></span> <span class="type-var">'a</span> * int)</span> <span class="arrow">-></span></span>
|
||||
<span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read_line"><a href="#val-read_line" class="anchor"></a><code><span><span class="keyword">val</span> read_line : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>string option</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read_line ic</code> will read a single line terminated by CR or CRLF from the input channel <code>ic</code>. It returns <code>None</code> if EOF or other error condition is reached.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read"><a href="#val-read" class="anchor"></a><code><span><span class="keyword">val</span> read : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span>int <span class="arrow">-></span></span> <span>string <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read ic len</code> will block until a maximum of <code>len</code> characters are read from the input channel <code>ic</code>. It returns an empty string if EOF or some other error condition occurs on the input channel, and can also return fewer than <code>len</code> characters if input buffering is not sufficient to satisfy the request.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-write"><a href="#val-write" class="anchor"></a><code><span><span class="keyword">val</span> write : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>string <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>write oc s</code> will block until the complete <code>s</code> string is written to the output channel <code>oc</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-flush"><a href="#val-flush" class="anchor"></a><code><span><span class="keyword">val</span> flush : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>flush oc</code> will return when all previously buffered content from calling <a href="#val-write"><code>write</code></a> have been written to the output channel <code>oc</code>.</p></div></div></details></div><div class="odoc-spec"><div class="spec type anchored" id="type-error"><a href="#type-error" class="anchor"></a><code><span><span class="keyword">type</span> error</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-catch"><a href="#val-catch" class="anchor"></a><code><span><span class="keyword">val</span> catch : <span><span>(<span>unit <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span><span>(<span class="type-var">'a</span>, <a href="#type-error">error</a>)</span> <a href="../../../../../../ocaml/Stdlib/index.html#type-result">result</a></span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>catch f</code> is <code>f () >|= Result.ok</code>, unless <code>f</code> fails with an IO error, in which case it returns the error.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pp_error"><a href="#val-pp_error" class="anchor"></a><code><span><span class="keyword">val</span> pp_error : <span><a href="../../../../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">-></span></span> <span><a href="#type-error">error</a> <span class="arrow">-></span></span> unit</span></code></div></div></div></body></html>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Connection (cohttp-lwt.Cohttp_lwt.S.Connection)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">S</a> » Connection</nav><header class="odoc-preamble"><h1>Module type <code><span>S.Connection</span></code></h1><p>The <code>Connection</code> module handles a single, possibly pipelined, http connection.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Net"><a href="#module-Net" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Net/index.html">Net</a></span><span> : <a href="../module-type-Net/index.html">Net</a></span></code></div></div><div class="odoc-spec"><div class="spec exception anchored" id="exception-Retry"><a href="#exception-Retry" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Retry</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Connection (cohttp-lwt.Cohttp_lwt.S.Connection)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">S</a> » Connection</nav><header class="odoc-preamble"><h1>Module type <code><span>S.Connection</span></code></h1><p>The <code>Connection</code> module handles a single, possibly pipelined, http connection.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Net"><a href="#module-Net" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Net/index.html">Net</a></span><span> : <a href="../module-type-Net/index.html">Net</a></span></code></div></div><div class="odoc-spec"><div class="spec exception anchored" id="exception-Retry"><a href="#exception-Retry" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Retry</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create :
|
||||
<span><span class="optlabel">?finalise</span>:<span>(<span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span>unit <a href="Net/IO/index.html#type-t">Net.IO.t</a></span>)</span> <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?persistent</span>:bool <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?ctx</span>:<a href="Net/index.html#type-ctx">Net.ctx</a> <span class="arrow">-></span></span>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Connection_cache (cohttp-lwt.Cohttp_lwt.S.Connection_cache)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">S</a> » Connection_cache</nav><header class="odoc-preamble"><h1>Module type <code><span>S.Connection_cache</span></code></h1><p>A <code>Connection_cache</code> handles http requests. It not necessarily caches connections.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-call"><a href="#val-call" class="anchor"></a><code><span><span class="keyword">val</span> call : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="../index.html#type-call">call</a></span></code></div><div class="spec-doc"><p>Process a request. Please see <a href="../index.html#type-call"><code>call</code></a>.</p></div></div></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Connection_cache (cohttp-lwt.Cohttp_lwt.S.Connection_cache)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">S</a> » Connection_cache</nav><header class="odoc-preamble"><h1>Module type <code><span>S.Connection_cache</span></code></h1><p>A <code>Connection_cache</code> handles http requests. It not necessarily caches connections.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-call"><a href="#val-call" class="anchor"></a><code><span><span class="keyword">val</span> call : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="../index.html#type-call">call</a></span></code></div><div class="spec-doc"><p>Process a request. Please see <a href="../index.html#type-call"><code>call</code></a>.</p></div></div></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp-lwt.Cohttp_lwt.S.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">S</a> » IO</nav><header class="odoc-preamble"><h1>Module type <code><span>S.IO</span></code></h1><p>The IO module is specialized for the <code>Lwt</code> monad.</p></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp-lwt.Cohttp_lwt.S.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">S</a> » IO</nav><header class="odoc-preamble"><h1>Module type <code><span>S.IO</span></code></h1><p>The IO module is specialized for the <code>Lwt</code> monad.</p></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<span><a href="#type-ic">ic</a> <span class="arrow">-></span></span>
|
||||
<span><span class="label">f</span>:<span>(<span>string <span class="arrow">-></span></span> <span><span class="label">pos</span>:int <span class="arrow">-></span></span> <span><span class="label">len</span>:int <span class="arrow">-></span></span> <span class="type-var">'a</span> * int)</span> <span class="arrow">-></span></span>
|
||||
<span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read_line"><a href="#val-read_line" class="anchor"></a><code><span><span class="keyword">val</span> read_line : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>string option</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read_line ic</code> will read a single line terminated by CR or CRLF from the input channel <code>ic</code>. It returns <code>None</code> if EOF or other error condition is reached.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read"><a href="#val-read" class="anchor"></a><code><span><span class="keyword">val</span> read : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span>int <span class="arrow">-></span></span> <span>string <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read ic len</code> will block until a maximum of <code>len</code> characters are read from the input channel <code>ic</code>. It returns an empty string if EOF or some other error condition occurs on the input channel, and can also return fewer than <code>len</code> characters if input buffering is not sufficient to satisfy the request.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-write"><a href="#val-write" class="anchor"></a><code><span><span class="keyword">val</span> write : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>string <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>write oc s</code> will block until the complete <code>s</code> string is written to the output channel <code>oc</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-flush"><a href="#val-flush" class="anchor"></a><code><span><span class="keyword">val</span> flush : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>flush oc</code> will return when all previously buffered content from calling <a href="#val-write"><code>write</code></a> have been written to the output channel <code>oc</code>.</p></div></div></details></div><div class="odoc-spec"><div class="spec type anchored" id="type-error"><a href="#type-error" class="anchor"></a><code><span><span class="keyword">type</span> error</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-catch"><a href="#val-catch" class="anchor"></a><code><span><span class="keyword">val</span> catch : <span><span>(<span>unit <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span><span>(<span class="type-var">'a</span>, <a href="#type-error">error</a>)</span> <a href="../../../../ocaml/Stdlib/index.html#type-result">result</a></span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>catch f</code> is <code>f () >|= Result.ok</code>, unless <code>f</code> fails with an IO error, in which case it returns the error.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pp_error"><a href="#val-pp_error" class="anchor"></a><code><span><span class="keyword">val</span> pp_error : <span><a href="../../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">-></span></span> <span><a href="#type-error">error</a> <span class="arrow">-></span></span> unit</span></code></div></div></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp-lwt.Cohttp_lwt.S.Net.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../index.html">Index</a> » <a href="../../../../index.html">cohttp-lwt</a> » <a href="../../../index.html">Cohttp_lwt</a> » <a href="../../index.html">S</a> » <a href="../index.html">Net</a> » IO</nav><header class="odoc-preamble"><h1>Module <code><span>Net.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp-lwt.Cohttp_lwt.S.Net.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../index.html">Index</a> » <a href="../../../../index.html">cohttp-lwt</a> » <a href="../../../index.html">Cohttp_lwt</a> » <a href="../../index.html">S</a> » <a href="../index.html">Net</a> » IO</nav><header class="odoc-preamble"><h1>Module <code><span>Net.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<span><a href="#type-ic">ic</a> <span class="arrow">-></span></span>
|
||||
<span><span class="label">f</span>:<span>(<span>string <span class="arrow">-></span></span> <span><span class="label">pos</span>:int <span class="arrow">-></span></span> <span><span class="label">len</span>:int <span class="arrow">-></span></span> <span class="type-var">'a</span> * int)</span> <span class="arrow">-></span></span>
|
||||
<span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read_line"><a href="#val-read_line" class="anchor"></a><code><span><span class="keyword">val</span> read_line : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>string option</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read_line ic</code> will read a single line terminated by CR or CRLF from the input channel <code>ic</code>. It returns <code>None</code> if EOF or other error condition is reached.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read"><a href="#val-read" class="anchor"></a><code><span><span class="keyword">val</span> read : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span>int <span class="arrow">-></span></span> <span>string <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read ic len</code> will block until a maximum of <code>len</code> characters are read from the input channel <code>ic</code>. It returns an empty string if EOF or some other error condition occurs on the input channel, and can also return fewer than <code>len</code> characters if input buffering is not sufficient to satisfy the request.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-write"><a href="#val-write" class="anchor"></a><code><span><span class="keyword">val</span> write : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>string <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>write oc s</code> will block until the complete <code>s</code> string is written to the output channel <code>oc</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-flush"><a href="#val-flush" class="anchor"></a><code><span><span class="keyword">val</span> flush : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>flush oc</code> will return when all previously buffered content from calling <a href="#val-write"><code>write</code></a> have been written to the output channel <code>oc</code>.</p></div></div></details></div><div class="odoc-spec"><div class="spec type anchored" id="type-error"><a href="#type-error" class="anchor"></a><code><span><span class="keyword">type</span> error</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-catch"><a href="#val-catch" class="anchor"></a><code><span><span class="keyword">val</span> catch : <span><span>(<span>unit <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span><span>(<span class="type-var">'a</span>, <a href="#type-error">error</a>)</span> <a href="../../../../../ocaml/Stdlib/index.html#type-result">result</a></span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>catch f</code> is <code>f () >|= Result.ok</code>, unless <code>f</code> fails with an IO error, in which case it returns the error.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pp_error"><a href="#val-pp_error" class="anchor"></a><code><span><span class="keyword">val</span> pp_error : <span><a href="../../../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">-></span></span> <span><a href="#type-error">error</a> <span class="arrow">-></span></span> unit</span></code></div></div></div></body></html>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp-lwt.Cohttp_lwt.S.Server.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../index.html">Index</a> » <a href="../../../../index.html">cohttp-lwt</a> » <a href="../../../index.html">Cohttp_lwt</a> » <a href="../../index.html">S</a> » <a href="../index.html">Server</a> » IO</nav><header class="odoc-preamble"><h1>Module <code><span>Server.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp-lwt.Cohttp_lwt.S.Server.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../index.html">Index</a> » <a href="../../../../index.html">cohttp-lwt</a> » <a href="../../../index.html">Cohttp_lwt</a> » <a href="../../index.html">S</a> » <a href="../index.html">Server</a> » IO</nav><header class="odoc-preamble"><h1>Module <code><span>Server.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<span><a href="#type-ic">ic</a> <span class="arrow">-></span></span>
|
||||
<span><span class="label">f</span>:<span>(<span>string <span class="arrow">-></span></span> <span><span class="label">pos</span>:int <span class="arrow">-></span></span> <span><span class="label">len</span>:int <span class="arrow">-></span></span> <span class="type-var">'a</span> * int)</span> <span class="arrow">-></span></span>
|
||||
<span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read_line"><a href="#val-read_line" class="anchor"></a><code><span><span class="keyword">val</span> read_line : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>string option</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read_line ic</code> will read a single line terminated by CR or CRLF from the input channel <code>ic</code>. It returns <code>None</code> if EOF or other error condition is reached.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read"><a href="#val-read" class="anchor"></a><code><span><span class="keyword">val</span> read : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span>int <span class="arrow">-></span></span> <span>string <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read ic len</code> will block until a maximum of <code>len</code> characters are read from the input channel <code>ic</code>. It returns an empty string if EOF or some other error condition occurs on the input channel, and can also return fewer than <code>len</code> characters if input buffering is not sufficient to satisfy the request.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-write"><a href="#val-write" class="anchor"></a><code><span><span class="keyword">val</span> write : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>string <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>write oc s</code> will block until the complete <code>s</code> string is written to the output channel <code>oc</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-flush"><a href="#val-flush" class="anchor"></a><code><span><span class="keyword">val</span> flush : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>flush oc</code> will return when all previously buffered content from calling <a href="#val-write"><code>write</code></a> have been written to the output channel <code>oc</code>.</p></div></div></details></div><div class="odoc-spec"><div class="spec type anchored" id="type-error"><a href="#type-error" class="anchor"></a><code><span><span class="keyword">type</span> error</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-catch"><a href="#val-catch" class="anchor"></a><code><span><span class="keyword">val</span> catch : <span><span>(<span>unit <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span><span>(<span class="type-var">'a</span>, <a href="#type-error">error</a>)</span> <a href="../../../../../ocaml/Stdlib/index.html#type-result">result</a></span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>catch f</code> is <code>f () >|= Result.ok</code>, unless <code>f</code> fails with an IO error, in which case it returns the error.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pp_error"><a href="#val-pp_error" class="anchor"></a><code><span><span class="keyword">val</span> pp_error : <span><a href="../../../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">-></span></span> <span><a href="#type-error">error</a> <span class="arrow">-></span></span> unit</span></code></div></div></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Server (cohttp-lwt.Cohttp_lwt.S.Server)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">S</a> » Server</nav><header class="odoc-preamble"><h1>Module type <code><span>S.Server</span></code></h1><p>The <code>Server</code> module implements a pipelined HTTP/1.1 server.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-IO"><a href="#module-IO" class="anchor"></a><code><span><span class="keyword">module</span> <a href="IO/index.html">IO</a></span><span> : <a href="../module-type-IO/index.html">IO</a></span></code></div></div><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../cohttp/Cohttp/Generic/Server/module-type-S/index.html">Cohttp.Generic.Server.S</a>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Server (cohttp-lwt.Cohttp_lwt.S.Server)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">S</a> » Server</nav><header class="odoc-preamble"><h1>Module type <code><span>S.Server</span></code></h1><p>The <code>Server</code> module implements a pipelined HTTP/1.1 server.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-IO"><a href="#module-IO" class="anchor"></a><code><span><span class="keyword">module</span> <a href="IO/index.html">IO</a></span><span> : <a href="../module-type-IO/index.html">IO</a></span></code></div></div><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../cohttp/Cohttp/Generic/Server/module-type-S/index.html">Cohttp.Generic.Server.S</a>
|
||||
<span class="keyword">with</span> <span><span class="keyword">type</span> <a href="../../../../cohttp/Cohttp/Generic/Server/module-type-S/index.html#type-body">body</a> = <a href="../../Body/index.html#type-t">Body.t</a></span>
|
||||
<span class="keyword">and</span> <span><span class="keyword">module</span> <a href="../../../../cohttp/Cohttp/Generic/Server/module-type-S/IO/index.html">IO</a> := <a href="IO/index.html">IO</a></span>
|
||||
<span class="keyword">and</span> <span><span class="keyword">type</span> <a href="../../../../cohttp/Cohttp/Generic/Server/module-type-S/index.html#type-response">response</a> = <a href="../../../../http/Http/Response/index.html#type-t">Http.Response.t</a> * <a href="../../Body/index.html#type-t">Body.t</a></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-body"><a href="#type-body" class="anchor"></a><code><span><span class="keyword">type</span> body</span><span> = <a href="../../Body/index.html#type-t">Body.t</a></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span><span> = <a href="IO/index.html#type-conn">IO.conn</a> * <a href="../../../../cohttp/Cohttp/Connection/index.html#type-t">Cohttp.Connection.t</a></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-response"><a href="#type-response" class="anchor"></a><code><span><span class="keyword">type</span> response</span><span> = <a href="../../../../http/Http/Response/index.html#type-t">Http.Response.t</a> * <a href="../../Body/index.html#type-t">Body.t</a></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-response_action"><a href="#type-response_action" class="anchor"></a><code><span><span class="keyword">type</span> response_action</span><span> = </span><span>[ </span></code><ol><li id="type-response_action.Expert" class="def variant constructor anchored"><a href="#type-response_action.Expert" class="anchor"></a><code><span>| </span><span>`Expert <span class="keyword">of</span> <a href="../../../../http/Http/Response/index.html#type-t">Http.Response.t</a> * <span>(<span><a href="IO/index.html#type-ic">IO.ic</a> <span class="arrow">-></span></span> <span><a href="IO/index.html#type-oc">IO.oc</a> <span class="arrow">-></span></span> <span>unit <a href="IO/index.html#type-t">IO.t</a></span>)</span></span></code></li><li id="type-response_action.Response" class="def variant constructor anchored"><a href="#type-response_action.Response" class="anchor"></a><code><span>| </span><span>`Response <span class="keyword">of</span> <a href="#type-response">response</a></span></code></li></ol><code><span> ]</span></code></div><div class="spec-doc"><p>A request handler can respond in two ways:</p><ul><li>Using <code>`Response</code>, with a <a href="../../../../cohttp/Cohttp/Response/index.html#type-t"><code>Response.t</code></a> and a <a href="#type-body"><code>body</code></a>.</li><li>Using <code>`Expert</code>, with a <a href="../../../../cohttp/Cohttp/Response/index.html#type-t"><code>Response.t</code></a> and an IO function that is expected to write the response body. The IO function has access to the underlying <a href="IO/index.html#type-ic"><code>IO.ic</code></a> and <a href="IO/index.html#type-oc"><code>IO.oc</code></a>, which allows writing a response body more efficiently, stream a response or to switch protocols entirely (e.g. websockets). Processing of pipelined requests continue after the <code>unit IO.t</code> is resolved. The connection can be closed by closing the <a href="IO/index.html#type-ic"><code>IO.ic</code></a>.</li></ul></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-make_response_action"><a href="#val-make_response_action" class="anchor"></a><code><span><span class="keyword">val</span> make_response_action :
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Sleep (cohttp-lwt.Cohttp_lwt.S.Sleep)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">S</a> » Sleep</nav><header class="odoc-preamble"><h1>Module type <code><span>S.Sleep</span></code></h1><p>This is compatible with <code>Mirage_time.S</code>. It may be satisfied by mirage-time-unix <code>Time</code> or <code>Mirage_time</code>.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-sleep_ns"><a href="#val-sleep_ns" class="anchor"></a><code><span><span class="keyword">val</span> sleep_ns : <span>int64 <span class="arrow">-></span></span> <span>unit <a href="../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div></div></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Sleep (cohttp-lwt.Cohttp_lwt.S.Sleep)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">S</a> » Sleep</nav><header class="odoc-preamble"><h1>Module type <code><span>S.Sleep</span></code></h1><p>This is compatible with <code>Mirage_time.S</code>. It may be satisfied by mirage-time-unix <code>Time</code> or <code>Mirage_time</code>.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-sleep_ns"><a href="#val-sleep_ns" class="anchor"></a><code><span><span class="keyword">val</span> sleep_ns : <span>int64 <span class="arrow">-></span></span> <span>unit <a href="../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div></div></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp-lwt.Cohttp_lwt.Server.Make.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../index.html">Index</a> » <a href="../../../../index.html">cohttp-lwt</a> » <a href="../../../index.html">Cohttp_lwt</a> » <a href="../../index.html">Server</a> » <a href="../index.html">Make</a> » IO</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp-lwt.Cohttp_lwt.Server.Make.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../index.html">Index</a> » <a href="../../../../index.html">cohttp-lwt</a> » <a href="../../../index.html">Cohttp_lwt</a> » <a href="../../index.html">Server</a> » <a href="../index.html">Make</a> » IO</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../../cohttp/Cohttp/S/module-type-IO/index.html">Cohttp.S.IO</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <span>'a <a href="../../../../../cohttp/Cohttp/S/module-type-IO/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <a href="../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../../../../../lwt/Lwt/index.html#type-t">Lwt.t</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<span><a href="#type-ic">ic</a> <span class="arrow">-></span></span>
|
||||
<span><span class="label">f</span>:<span>(<span>string <span class="arrow">-></span></span> <span><span class="label">pos</span>:int <span class="arrow">-></span></span> <span><span class="label">len</span>:int <span class="arrow">-></span></span> <span class="type-var">'a</span> * int)</span> <span class="arrow">-></span></span>
|
||||
<span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read_line"><a href="#val-read_line" class="anchor"></a><code><span><span class="keyword">val</span> read_line : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>string option</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read_line ic</code> will read a single line terminated by CR or CRLF from the input channel <code>ic</code>. It returns <code>None</code> if EOF or other error condition is reached.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read"><a href="#val-read" class="anchor"></a><code><span><span class="keyword">val</span> read : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span>int <span class="arrow">-></span></span> <span>string <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read ic len</code> will block until a maximum of <code>len</code> characters are read from the input channel <code>ic</code>. It returns an empty string if EOF or some other error condition occurs on the input channel, and can also return fewer than <code>len</code> characters if input buffering is not sufficient to satisfy the request.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-write"><a href="#val-write" class="anchor"></a><code><span><span class="keyword">val</span> write : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>string <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>write oc s</code> will block until the complete <code>s</code> string is written to the output channel <code>oc</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-flush"><a href="#val-flush" class="anchor"></a><code><span><span class="keyword">val</span> flush : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>flush oc</code> will return when all previously buffered content from calling <a href="#val-write"><code>write</code></a> have been written to the output channel <code>oc</code>.</p></div></div></details></div><div class="odoc-spec"><div class="spec type anchored" id="type-error"><a href="#type-error" class="anchor"></a><code><span><span class="keyword">type</span> error</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-catch"><a href="#val-catch" class="anchor"></a><code><span><span class="keyword">val</span> catch : <span><span>(<span>unit <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span><span>(<span class="type-var">'a</span>, <a href="#type-error">error</a>)</span> <a href="../../../../../ocaml/Stdlib/index.html#type-result">result</a></span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>catch f</code> is <code>f () >|= Result.ok</code>, unless <code>f</code> fails with an IO error, in which case it returns the error.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pp_error"><a href="#val-pp_error" class="anchor"></a><code><span><span class="keyword">val</span> pp_error : <span><a href="../../../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">-></span></span> <span><a href="#type-error">error</a> <span class="arrow">-></span></span> unit</span></code></div></div></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Make (cohttp-lwt.Cohttp_lwt.Server.Make)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">Server</a> » Make</nav><header class="odoc-preamble"><h1>Module <code><span>Server.Make</span></code></h1></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#parameters">Parameters</a></li><li><a href="#signature">Signature</a></li></ul></nav></div><div class="odoc-content"><h2 id="parameters"><a href="#parameters" class="anchor"></a>Parameters</h2><div class="odoc-spec"><div class="spec parameter anchored" id="argument-1-IO"><a href="#argument-1-IO" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-1-IO/index.html">IO</a></span><span> : <a href="../../S/module-type-IO/index.html">S.IO</a></span></code></div></div><h2 id="signature"><a href="#signature" class="anchor"></a>Signature</h2><div class="odoc-spec"><div class="spec module anchored" id="module-IO"><a href="#module-IO" class="anchor"></a><code><span><span class="keyword">module</span> IO</span><span> = <a href="argument-1-IO/index.html">IO</a></span></code></div></div><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../cohttp/Cohttp/Generic/Server/module-type-S/index.html">Cohttp.Generic.Server.S</a>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Make (cohttp-lwt.Cohttp_lwt.Server.Make)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp-lwt</a> » <a href="../../index.html">Cohttp_lwt</a> » <a href="../index.html">Server</a> » Make</nav><header class="odoc-preamble"><h1>Module <code><span>Server.Make</span></code></h1></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#parameters">Parameters</a></li><li><a href="#signature">Signature</a></li></ul></nav></div><div class="odoc-content"><h2 id="parameters"><a href="#parameters" class="anchor"></a>Parameters</h2><div class="odoc-spec"><div class="spec parameter anchored" id="argument-1-IO"><a href="#argument-1-IO" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-1-IO/index.html">IO</a></span><span> : <a href="../../S/module-type-IO/index.html">S.IO</a></span></code></div></div><h2 id="signature"><a href="#signature" class="anchor"></a>Signature</h2><div class="odoc-spec"><div class="spec module anchored" id="module-IO"><a href="#module-IO" class="anchor"></a><code><span><span class="keyword">module</span> IO</span><span> = <a href="argument-1-IO/index.html">IO</a></span></code></div></div><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../cohttp/Cohttp/Generic/Server/module-type-S/index.html">Cohttp.Generic.Server.S</a>
|
||||
<span class="keyword">with</span> <span><span class="keyword">type</span> <a href="../../../../cohttp/Cohttp/Generic/Server/module-type-S/index.html#type-body">body</a> = <a href="../../Body/index.html#type-t">Body.t</a></span>
|
||||
<span class="keyword">and</span> <span><span class="keyword">module</span> <a href="../../../../cohttp/Cohttp/Generic/Server/module-type-S/IO/index.html">IO</a> := <a href="argument-1-IO/index.html">IO</a></span>
|
||||
<span class="keyword">and</span> <span><span class="keyword">type</span> <a href="../../../../cohttp/Cohttp/Generic/Server/module-type-S/index.html#type-response">response</a> = <a href="../../../../http/Http/Response/index.html#type-t">Http.Response.t</a> * <a href="../../Body/index.html#type-t">Body.t</a></span></span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-body"><a href="#type-body" class="anchor"></a><code><span><span class="keyword">type</span> body</span><span> = <a href="../../Body/index.html#type-t">Body.t</a></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span><span> = <a href="argument-1-IO/index.html#type-conn">IO.conn</a> * <a href="../../../../cohttp/Cohttp/Connection/index.html#type-t">Cohttp.Connection.t</a></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-response"><a href="#type-response" class="anchor"></a><code><span><span class="keyword">type</span> response</span><span> = <a href="../../../../http/Http/Response/index.html#type-t">Http.Response.t</a> * <a href="../../Body/index.html#type-t">Body.t</a></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-response_action"><a href="#type-response_action" class="anchor"></a><code><span><span class="keyword">type</span> response_action</span><span> = </span><span>[ </span></code><ol><li id="type-response_action.Expert" class="def variant constructor anchored"><a href="#type-response_action.Expert" class="anchor"></a><code><span>| </span><span>`Expert <span class="keyword">of</span> <a href="../../../../http/Http/Response/index.html#type-t">Http.Response.t</a> * <span>(<span><a href="argument-1-IO/index.html#type-ic">IO.ic</a> <span class="arrow">-></span></span> <span><a href="argument-1-IO/index.html#type-oc">IO.oc</a> <span class="arrow">-></span></span> <span>unit <a href="argument-1-IO/index.html#type-t">IO.t</a></span>)</span></span></code></li><li id="type-response_action.Response" class="def variant constructor anchored"><a href="#type-response_action.Response" class="anchor"></a><code><span>| </span><span>`Response <span class="keyword">of</span> <a href="#type-response">response</a></span></code></li></ol><code><span> ]</span></code></div><div class="spec-doc"><p>A request handler can respond in two ways:</p><ul><li>Using <code>`Response</code>, with a <a href="../../../../cohttp/Cohttp/Response/index.html#type-t"><code>Response.t</code></a> and a <a href="#type-body"><code>body</code></a>.</li><li>Using <code>`Expert</code>, with a <a href="../../../../cohttp/Cohttp/Response/index.html#type-t"><code>Response.t</code></a> and an IO function that is expected to write the response body. The IO function has access to the underlying <a href="argument-1-IO/index.html#type-ic"><code>IO.ic</code></a> and <a href="argument-1-IO/index.html#type-oc"><code>IO.oc</code></a>, which allows writing a response body more efficiently, stream a response or to switch protocols entirely (e.g. websockets). Processing of pipelined requests continue after the <code>unit IO.t</code> is resolved. The connection can be closed by closing the <a href="argument-1-IO/index.html#type-ic"><code>IO.ic</code></a>.</li></ul></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-make_response_action"><a href="#val-make_response_action" class="anchor"></a><code><span><span class="keyword">val</span> make_response_action :
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Server (cohttp-lwt.Cohttp_lwt.Server)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cohttp-lwt</a> » <a href="../index.html">Cohttp_lwt</a> » Server</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt.Server</span></code></h1><p>The <code>Make</code> functor glues together a <a href="../../../cohttp/Cohttp/S/module-type-IO/index.html"><code>Cohttp.S.IO</code></a> implementation to send requests down a connection that is established by the user. The resulting module satisfies the <a href="#"><code>Server</code></a> module type.</p><p>The <a href="../../../logs/Logs/index.html"><code>Logs</code></a> source name for this module's logger is <code>"cohttp.lwt.server"</code>.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Make"><a href="#module-Make" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Make/index.html">Make</a></span><span> (<a href="Make/argument-1-IO/index.html">IO</a> : <a href="../S/module-type-IO/index.html">S.IO</a>) : <a href="../S/module-type-Server/index.html">S.Server</a> <span class="keyword">with</span> <span><span class="keyword">module</span> <a href="../S/module-type-Server/IO/index.html">IO</a> = <a href="Make/argument-1-IO/index.html">IO</a></span></span></code></div></div></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Server (cohttp-lwt.Cohttp_lwt.Server)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cohttp-lwt</a> » <a href="../index.html">Cohttp_lwt</a> » Server</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt.Server</span></code></h1><p>The <code>Make</code> functor glues together a <a href="../../../cohttp/Cohttp/S/module-type-IO/index.html"><code>Cohttp.S.IO</code></a> implementation to send requests down a connection that is established by the user. The resulting module satisfies the <a href="#"><code>Server</code></a> module type.</p><p>The <a href="../../../logs/Logs/index.html"><code>Logs</code></a> source name for this module's logger is <code>"cohttp.lwt.server"</code>.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Make"><a href="#module-Make" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Make/index.html">Make</a></span><span> (<a href="Make/argument-1-IO/index.html">IO</a> : <a href="../S/module-type-IO/index.html">S.IO</a>) : <a href="../S/module-type-Server/index.html">S.Server</a> <span class="keyword">with</span> <span><span class="keyword">module</span> <a href="../S/module-type-Server/IO/index.html">IO</a> = <a href="Make/argument-1-IO/index.html">IO</a></span></span></code></div></div></div></body></html>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cohttp_lwt__ (cohttp-lwt.Cohttp_lwt__)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">cohttp-lwt</a> » Cohttp_lwt__</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt__</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cohttp_lwt__ (cohttp-lwt.Cohttp_lwt__)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">cohttp-lwt</a> » Cohttp_lwt__</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt__</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cohttp_lwt__Body (cohttp-lwt.Cohttp_lwt__Body)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">cohttp-lwt</a> » Cohttp_lwt__Body</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt__Body</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cohttp_lwt__Body (cohttp-lwt.Cohttp_lwt__Body)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">cohttp-lwt</a> » Cohttp_lwt__Body</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt__Body</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cohttp_lwt__Bytebuffer (cohttp-lwt.Cohttp_lwt__Bytebuffer)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">cohttp-lwt</a> » Cohttp_lwt__Bytebuffer</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt__Bytebuffer</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cohttp_lwt__Bytebuffer (cohttp-lwt.Cohttp_lwt__Bytebuffer)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">cohttp-lwt</a> » Cohttp_lwt__Bytebuffer</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt__Bytebuffer</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cohttp_lwt__Client (cohttp-lwt.Cohttp_lwt__Client)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">cohttp-lwt</a> » Cohttp_lwt__Client</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt__Client</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cohttp_lwt__Client (cohttp-lwt.Cohttp_lwt__Client)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">cohttp-lwt</a> » Cohttp_lwt__Client</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt__Client</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cohttp_lwt__Connection (cohttp-lwt.Cohttp_lwt__Connection)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">cohttp-lwt</a> » Cohttp_lwt__Connection</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt__Connection</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cohttp_lwt__Connection (cohttp-lwt.Cohttp_lwt__Connection)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">cohttp-lwt</a> » Cohttp_lwt__Connection</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt__Connection</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cohttp_lwt__Connection_cache (cohttp-lwt.Cohttp_lwt__Connection_cache)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">cohttp-lwt</a> » Cohttp_lwt__Connection_cache</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt__Connection_cache</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cohttp_lwt__Connection_cache (cohttp-lwt.Cohttp_lwt__Connection_cache)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">cohttp-lwt</a> » Cohttp_lwt__Connection_cache</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt__Connection_cache</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cohttp_lwt__Make (cohttp-lwt.Cohttp_lwt__Make)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">cohttp-lwt</a> » Cohttp_lwt__Make</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt__Make</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cohttp_lwt__Make (cohttp-lwt.Cohttp_lwt__Make)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">cohttp-lwt</a> » Cohttp_lwt__Make</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt__Make</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cohttp_lwt__S (cohttp-lwt.Cohttp_lwt__S)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">cohttp-lwt</a> » Cohttp_lwt__S</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt__S</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cohttp_lwt__S (cohttp-lwt.Cohttp_lwt__S)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">cohttp-lwt</a> » Cohttp_lwt__S</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt__S</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cohttp_lwt__Server (cohttp-lwt.Cohttp_lwt__Server)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">cohttp-lwt</a> » Cohttp_lwt__Server</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt__Server</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cohttp_lwt__Server (cohttp-lwt.Cohttp_lwt__Server)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">cohttp-lwt</a> » Cohttp_lwt__Server</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt__Server</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cohttp_lwt__String_io (cohttp-lwt.Cohttp_lwt__String_io)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">cohttp-lwt</a> » Cohttp_lwt__String_io</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt__String_io</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cohttp_lwt__String_io (cohttp-lwt.Cohttp_lwt__String_io)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">Index</a> » <a href="../index.html">cohttp-lwt</a> » Cohttp_lwt__String_io</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp_lwt__String_io</span></code></h1></header><div class="odoc-content"><p>This module is hidden.</p></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>index (cohttp-lwt.index)</title><meta charset="utf-8"/><link rel="stylesheet" href="../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../index.html">Index</a> » cohttp-lwt</nav><header class="odoc-preamble"><h1 id="package-cohttp-lwt"><a href="#package-cohttp-lwt" class="anchor"></a>Package cohttp-lwt <nav><a type="text/plain; charset=UTF-8" href="_doc-dir/CHANGES.md">changes</a> <a href="#package_info">more…</a></nav></h1><ul class="modules"><li><a href="Cohttp_lwt/index.html"><code>Cohttp_lwt</code></a> </li></ul></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#package_info">Package info</a></li></ul></nav></div><div class="odoc-content"><h2 id="package_info"><a href="#package_info" class="anchor"></a>Package info</h2><table class="package info"><tr id="info-changes-files"><td><a href="#info-changes-files" aria-hidden="true" class="anchor"></a>changes-files</td><td><ul><li><a type="text/plain; charset=UTF-8" href="_doc-dir/CHANGES.md">CHANGES.md</a></li></ul></td></tr><tr id="info-license-files"><td><a href="#info-license-files" aria-hidden="true" class="anchor"></a>license-files</td><td><ul><li><a type="text/plain; charset=UTF-8" href="_doc-dir/LICENSE.md">LICENSE.md</a></li></ul></td></tr><tr id="info-readme-files"><td><a href="#info-readme-files" aria-hidden="true" class="anchor"></a>readme-files</td><td><ul><li><a type="text/plain; charset=UTF-8" href="_doc-dir/README.md">README.md</a></li></ul></td></tr></table></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>index (cohttp-lwt.index)</title><meta charset="utf-8"/><link rel="stylesheet" href="../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../index.html">Index</a> » cohttp-lwt</nav><header class="odoc-preamble"><h1 id="package-cohttp-lwt"><a href="#package-cohttp-lwt" class="anchor"></a>Package cohttp-lwt <nav><a type="text/plain; charset=UTF-8" href="_doc-dir/CHANGES.md">changes</a> <a href="#package_info">more…</a></nav></h1><ul class="modules"><li><a href="Cohttp_lwt/index.html"><code>Cohttp_lwt</code></a> </li></ul></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#package_info">Package info</a></li></ul></nav></div><div class="odoc-content"><h2 id="package_info"><a href="#package_info" class="anchor"></a>Package info</h2><table class="package info"><tr id="info-changes-files"><td><a href="#info-changes-files" aria-hidden="true" class="anchor"></a>changes-files</td><td><ul><li><a type="text/plain; charset=UTF-8" href="_doc-dir/CHANGES.md">CHANGES.md</a></li></ul></td></tr><tr id="info-license-files"><td><a href="#info-license-files" aria-hidden="true" class="anchor"></a>license-files</td><td><ul><li><a type="text/plain; charset=UTF-8" href="_doc-dir/LICENSE.md">LICENSE.md</a></li></ul></td></tr><tr id="info-readme-files"><td><a href="#info-readme-files" aria-hidden="true" class="anchor"></a>readme-files</td><td><ul><li><a type="text/plain; charset=UTF-8" href="_doc-dir/README.md">README.md</a></li></ul></td></tr></table></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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Conf (cohttp.Cohttp.Conf)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cohttp</a> » <a href="../index.html">Cohttp</a> » Conf</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp.Conf</span></code></h1><p>Compile-time configuration variables</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-version"><a href="#val-version" class="anchor"></a><code><span><span class="keyword">val</span> version : string</span></code></div><div class="spec-doc"><p>The version number of this library.</p></div></div></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Conf (cohttp.Cohttp.Conf)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cohttp</a> » <a href="../index.html">Cohttp</a> » Conf</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp.Conf</span></code></h1><p>Compile-time configuration variables</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-version"><a href="#val-version" class="anchor"></a><code><span><span class="keyword">val</span> version : string</span></code></div><div class="spec-doc"><p>The version number of this library.</p></div></div></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Connection (cohttp.Cohttp.Connection)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cohttp</a> » <a href="../index.html">Cohttp</a> » Connection</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp.Connection</span></code></h1><ul class="at-tags"><li class="deprecated"><span class="at-tag">deprecated</span> Connection.t values are useless.</li></ul><p>Connection identifiers.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div><div class="spec-doc"><p>Abstract type for connection identifiers.</p></div></div><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../sexplib0/Sexplib0/Sexpable/module-type-S/index.html">Sexplib0.Sexpable.S</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="../../../sexplib0/Sexplib0/Sexpable/module-type-S/index.html#type-t">t</a> := <a href="#type-t">t</a></span></span></code></summary><div class="odoc-spec"><div class="spec value anchored" id="val-t_of_sexp"><a href="#val-t_of_sexp" class="anchor"></a><code><span><span class="keyword">val</span> t_of_sexp : <span><a href="../../../sexplib0/Sexplib0/Sexp/index.html#type-t">Sexplib0.Sexp.t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-sexp_of_t"><a href="#val-sexp_of_t" class="anchor"></a><code><span><span class="keyword">val</span> sexp_of_t : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="../../../sexplib0/Sexplib0/Sexp/index.html#type-t">Sexplib0.Sexp.t</a></span></code></div></div></details></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create : <span>unit <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Create a fresh connection identifier.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-to_string"><a href="#val-to_string" class="anchor"></a><code><span><span class="keyword">val</span> to_string : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> string</span></code></div><div class="spec-doc"><p>Pretty-print a connection identifier.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-compare"><a href="#val-compare" class="anchor"></a><code><span><span class="keyword">val</span> compare : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="#type-t">t</a> <span class="arrow">-></span></span> int</span></code></div><div class="spec-doc"><p>Comparison function for two identifiers. More recently constructed identifiers will be greater than older ones.</p></div></div></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Connection (cohttp.Cohttp.Connection)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cohttp</a> » <a href="../index.html">Cohttp</a> » Connection</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp.Connection</span></code></h1><ul class="at-tags"><li class="deprecated"><span class="at-tag">deprecated</span> Connection.t values are useless.</li></ul><p>Connection identifiers.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div><div class="spec-doc"><p>Abstract type for connection identifiers.</p></div></div><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../sexplib0/Sexplib0/Sexpable/module-type-S/index.html">Sexplib0.Sexpable.S</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="../../../sexplib0/Sexplib0/Sexpable/module-type-S/index.html#type-t">t</a> := <a href="#type-t">t</a></span></span></code></summary><div class="odoc-spec"><div class="spec value anchored" id="val-t_of_sexp"><a href="#val-t_of_sexp" class="anchor"></a><code><span><span class="keyword">val</span> t_of_sexp : <span><a href="../../../sexplib0/Sexplib0/Sexp/index.html#type-t">Sexplib0.Sexp.t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-sexp_of_t"><a href="#val-sexp_of_t" class="anchor"></a><code><span><span class="keyword">val</span> sexp_of_t : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="../../../sexplib0/Sexplib0/Sexp/index.html#type-t">Sexplib0.Sexp.t</a></span></code></div></div></details></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create : <span>unit <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Create a fresh connection identifier.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-to_string"><a href="#val-to_string" class="anchor"></a><code><span><span class="keyword">val</span> to_string : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> string</span></code></div><div class="spec-doc"><p>Pretty-print a connection identifier.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-compare"><a href="#val-compare" class="anchor"></a><code><span><span class="keyword">val</span> compare : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="#type-t">t</a> <span class="arrow">-></span></span> int</span></code></div><div class="spec-doc"><p>Comparison function for two identifiers. More recently constructed identifiers will be greater than older ones.</p></div></div></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cookie_hdr (cohttp.Cohttp.Cookie.Cookie_hdr)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp</a> » <a href="../../index.html">Cohttp</a> » <a href="../index.html">Cookie</a> » Cookie_hdr</nav><header class="odoc-preamble"><h1>Module <code><span>Cookie.Cookie_hdr</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-extract"><a href="#val-extract" class="anchor"></a><code><span><span class="keyword">val</span> extract : <span><a href="../../Header/index.html#type-t">Header.t</a> <span class="arrow">-></span></span> <span><a href="../index.html#type-cookie">cookie</a> list</span></span></code></div><div class="spec-doc"><p>Return the list of cookies sent by the client</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-serialize"><a href="#val-serialize" class="anchor"></a><code><span><span class="keyword">val</span> serialize : <span><span><a href="../index.html#type-cookie">cookie</a> list</span> <span class="arrow">-></span></span> string * string</span></code></div><div class="spec-doc"><p><code>serialize cookies</code> returns an HTTP header containing <code>cookies</code></p></div></div></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cookie_hdr (cohttp.Cohttp.Cookie.Cookie_hdr)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp</a> » <a href="../../index.html">Cohttp</a> » <a href="../index.html">Cookie</a> » Cookie_hdr</nav><header class="odoc-preamble"><h1>Module <code><span>Cookie.Cookie_hdr</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-extract"><a href="#val-extract" class="anchor"></a><code><span><span class="keyword">val</span> extract : <span><a href="../../Header/index.html#type-t">Header.t</a> <span class="arrow">-></span></span> <span><a href="../index.html#type-cookie">cookie</a> list</span></span></code></div><div class="spec-doc"><p>Return the list of cookies sent by the client</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-serialize"><a href="#val-serialize" class="anchor"></a><code><span><span class="keyword">val</span> serialize : <span><span><a href="../index.html#type-cookie">cookie</a> list</span> <span class="arrow">-></span></span> string * string</span></code></div><div class="spec-doc"><p><code>serialize cookies</code> returns an HTTP header containing <code>cookies</code></p></div></div></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Set_cookie_hdr (cohttp.Cohttp.Cookie.Set_cookie_hdr)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp</a> » <a href="../../index.html">Cohttp</a> » <a href="../index.html">Cookie</a> » Set_cookie_hdr</nav><header class="odoc-preamble"><h1>Module <code><span>Cookie.Set_cookie_hdr</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span><span> = </span><span>{</span></code><ol><li id="type-t.cookie" class="def record field anchored"><a href="#type-t.cookie" class="anchor"></a><code><span>cookie : <a href="../index.html#type-cookie">cookie</a>;</span></code></li><li id="type-t.expiration" class="def record field anchored"><a href="#type-t.expiration" class="anchor"></a><code><span>expiration : <a href="../index.html#type-expiration">expiration</a>;</span></code></li><li id="type-t.domain" class="def record field anchored"><a href="#type-t.domain" class="anchor"></a><code><span>domain : <span>string option</span>;</span></code></li><li id="type-t.path" class="def record field anchored"><a href="#type-t.path" class="anchor"></a><code><span>path : <span>string option</span>;</span></code></li><li id="type-t.secure" class="def record field anchored"><a href="#type-t.secure" class="anchor"></a><code><span>secure : bool;</span></code></li><li id="type-t.http_only" class="def record field anchored"><a href="#type-t.http_only" class="anchor"></a><code><span>http_only : bool;</span></code></li></ol><code><span>}</span></code></div><div class="spec-doc"><p>A header which a server sends to a client to request that the client returns the cookie in future requests, under certain conditions.</p></div></div><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../sexplib0/Sexplib0/Sexpable/module-type-S/index.html">Sexplib0.Sexpable.S</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="../../../../sexplib0/Sexplib0/Sexpable/module-type-S/index.html#type-t">t</a> := <a href="#type-t">t</a></span></span></code></summary><div class="odoc-spec"><div class="spec value anchored" id="val-t_of_sexp"><a href="#val-t_of_sexp" class="anchor"></a><code><span><span class="keyword">val</span> t_of_sexp : <span><a href="../../../../sexplib0/Sexplib0/Sexp/index.html#type-t">Sexplib0.Sexp.t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-sexp_of_t"><a href="#val-sexp_of_t" class="anchor"></a><code><span><span class="keyword">val</span> sexp_of_t : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="../../../../sexplib0/Sexplib0/Sexp/index.html#type-t">Sexplib0.Sexp.t</a></span></code></div></div></details></div><div class="odoc-spec"><div class="spec value anchored" id="val-make"><a href="#val-make" class="anchor"></a><code><span><span class="keyword">val</span> make :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Set_cookie_hdr (cohttp.Cohttp.Cookie.Set_cookie_hdr)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../index.html">Index</a> » <a href="../../../index.html">cohttp</a> » <a href="../../index.html">Cohttp</a> » <a href="../index.html">Cookie</a> » Set_cookie_hdr</nav><header class="odoc-preamble"><h1>Module <code><span>Cookie.Set_cookie_hdr</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span><span> = </span><span>{</span></code><ol><li id="type-t.cookie" class="def record field anchored"><a href="#type-t.cookie" class="anchor"></a><code><span>cookie : <a href="../index.html#type-cookie">cookie</a>;</span></code></li><li id="type-t.expiration" class="def record field anchored"><a href="#type-t.expiration" class="anchor"></a><code><span>expiration : <a href="../index.html#type-expiration">expiration</a>;</span></code></li><li id="type-t.domain" class="def record field anchored"><a href="#type-t.domain" class="anchor"></a><code><span>domain : <span>string option</span>;</span></code></li><li id="type-t.path" class="def record field anchored"><a href="#type-t.path" class="anchor"></a><code><span>path : <span>string option</span>;</span></code></li><li id="type-t.secure" class="def record field anchored"><a href="#type-t.secure" class="anchor"></a><code><span>secure : bool;</span></code></li><li id="type-t.http_only" class="def record field anchored"><a href="#type-t.http_only" class="anchor"></a><code><span>http_only : bool;</span></code></li></ol><code><span>}</span></code></div><div class="spec-doc"><p>A header which a server sends to a client to request that the client returns the cookie in future requests, under certain conditions.</p></div></div><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../../sexplib0/Sexplib0/Sexpable/module-type-S/index.html">Sexplib0.Sexpable.S</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="../../../../sexplib0/Sexplib0/Sexpable/module-type-S/index.html#type-t">t</a> := <a href="#type-t">t</a></span></span></code></summary><div class="odoc-spec"><div class="spec value anchored" id="val-t_of_sexp"><a href="#val-t_of_sexp" class="anchor"></a><code><span><span class="keyword">val</span> t_of_sexp : <span><a href="../../../../sexplib0/Sexplib0/Sexp/index.html#type-t">Sexplib0.Sexp.t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-sexp_of_t"><a href="#val-sexp_of_t" class="anchor"></a><code><span><span class="keyword">val</span> sexp_of_t : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="../../../../sexplib0/Sexplib0/Sexp/index.html#type-t">Sexplib0.Sexp.t</a></span></code></div></div></details></div><div class="odoc-spec"><div class="spec value anchored" id="val-make"><a href="#val-make" class="anchor"></a><code><span><span class="keyword">val</span> make :
|
||||
<span><span class="optlabel">?expiration</span>:<a href="../index.html#type-expiration">expiration</a> <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?path</span>:string <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?domain</span>:string <span class="arrow">-></span></span>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cookie (cohttp.Cohttp.Cookie)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cohttp</a> » <a href="../index.html">Cohttp</a> » Cookie</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp.Cookie</span></code></h1><p>Functions for the HTTP Cookie and Set-Cookie header fields. Using the Set-Cookie header field, an HTTP server can pass name/value pairs and associated metadata (called cookies) to a user agent. When the user agent makes subsequent requests to the server, the user agent uses the metadata and other information to determine whether to return the name/value pairs in the Cookie header.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-expiration"><a href="#type-expiration" class="anchor"></a><code><span><span class="keyword">type</span> expiration</span><span> = </span><span>[ </span></code><ol><li id="type-expiration.Session" class="def variant constructor anchored"><a href="#type-expiration.Session" class="anchor"></a><code><span>| </span><span>`Session</span></code><div class="def-doc"><span class="comment-delim">(*</span><p>Instructs the user agent to discard the cookie unconditionally when the user agent terminates.</p><span class="comment-delim">*)</span></div></li><li id="type-expiration.Max_age" class="def variant constructor anchored"><a href="#type-expiration.Max_age" class="anchor"></a><code><span>| </span><span>`Max_age <span class="keyword">of</span> int64</span></code><div class="def-doc"><span class="comment-delim">(*</span><p>The value of the Max-Age attribute is delta-seconds, the lifetime of the cookie in seconds, a decimal non-negative integer.</p><span class="comment-delim">*)</span></div></li></ol><code><span> ]</span></code></div><div class="spec-doc"><p>Lifetime of the cookie after which the user agent discards it</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-sexp_of_expiration"><a href="#val-sexp_of_expiration" class="anchor"></a><code><span><span class="keyword">val</span> sexp_of_expiration : <span><a href="#type-expiration">expiration</a> <span class="arrow">-></span></span> <a href="../../../sexplib0/Sexplib0/Sexp/index.html#type-t">Sexplib0.Sexp.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-expiration_of_sexp"><a href="#val-expiration_of_sexp" class="anchor"></a><code><span><span class="keyword">val</span> expiration_of_sexp : <span><a href="../../../sexplib0/Sexplib0/Sexp/index.html#type-t">Sexplib0.Sexp.t</a> <span class="arrow">-></span></span> <a href="#type-expiration">expiration</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-__expiration_of_sexp__"><a href="#val-__expiration_of_sexp__" class="anchor"></a><code><span><span class="keyword">val</span> __expiration_of_sexp__ : <span><a href="../../../sexplib0/Sexplib0/Sexp/index.html#type-t">Sexplib0.Sexp.t</a> <span class="arrow">-></span></span> <a href="#type-expiration">expiration</a></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-cookie"><a href="#type-cookie" class="anchor"></a><code><span><span class="keyword">type</span> cookie</span><span> = string * string</span></code></div><div class="spec-doc"><p>A cookie is simply a key/value pair send from the client to the server</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Set_cookie_hdr"><a href="#module-Set_cookie_hdr" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Set_cookie_hdr/index.html">Set_cookie_hdr</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Cookie_hdr"><a href="#module-Cookie_hdr" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Cookie_hdr/index.html">Cookie_hdr</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cookie (cohttp.Cohttp.Cookie)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">Index</a> » <a href="../../index.html">cohttp</a> » <a href="../index.html">Cohttp</a> » Cookie</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp.Cookie</span></code></h1><p>Functions for the HTTP Cookie and Set-Cookie header fields. Using the Set-Cookie header field, an HTTP server can pass name/value pairs and associated metadata (called cookies) to a user agent. When the user agent makes subsequent requests to the server, the user agent uses the metadata and other information to determine whether to return the name/value pairs in the Cookie header.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-expiration"><a href="#type-expiration" class="anchor"></a><code><span><span class="keyword">type</span> expiration</span><span> = </span><span>[ </span></code><ol><li id="type-expiration.Session" class="def variant constructor anchored"><a href="#type-expiration.Session" class="anchor"></a><code><span>| </span><span>`Session</span></code><div class="def-doc"><span class="comment-delim">(*</span><p>Instructs the user agent to discard the cookie unconditionally when the user agent terminates.</p><span class="comment-delim">*)</span></div></li><li id="type-expiration.Max_age" class="def variant constructor anchored"><a href="#type-expiration.Max_age" class="anchor"></a><code><span>| </span><span>`Max_age <span class="keyword">of</span> int64</span></code><div class="def-doc"><span class="comment-delim">(*</span><p>The value of the Max-Age attribute is delta-seconds, the lifetime of the cookie in seconds, a decimal non-negative integer.</p><span class="comment-delim">*)</span></div></li></ol><code><span> ]</span></code></div><div class="spec-doc"><p>Lifetime of the cookie after which the user agent discards it</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-sexp_of_expiration"><a href="#val-sexp_of_expiration" class="anchor"></a><code><span><span class="keyword">val</span> sexp_of_expiration : <span><a href="#type-expiration">expiration</a> <span class="arrow">-></span></span> <a href="../../../sexplib0/Sexplib0/Sexp/index.html#type-t">Sexplib0.Sexp.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-expiration_of_sexp"><a href="#val-expiration_of_sexp" class="anchor"></a><code><span><span class="keyword">val</span> expiration_of_sexp : <span><a href="../../../sexplib0/Sexplib0/Sexp/index.html#type-t">Sexplib0.Sexp.t</a> <span class="arrow">-></span></span> <a href="#type-expiration">expiration</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-__expiration_of_sexp__"><a href="#val-__expiration_of_sexp__" class="anchor"></a><code><span><span class="keyword">val</span> __expiration_of_sexp__ : <span><a href="../../../sexplib0/Sexplib0/Sexp/index.html#type-t">Sexplib0.Sexp.t</a> <span class="arrow">-></span></span> <a href="#type-expiration">expiration</a></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-cookie"><a href="#type-cookie" class="anchor"></a><code><span><span class="keyword">type</span> cookie</span><span> = string * string</span></code></div><div class="spec-doc"><p>A cookie is simply a key/value pair send from the client to the server</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Set_cookie_hdr"><a href="#module-Set_cookie_hdr" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Set_cookie_hdr/index.html">Set_cookie_hdr</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Cookie_hdr"><a href="#module-Cookie_hdr" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Cookie_hdr/index.html">Cookie_hdr</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div></div></body></html>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Base (cohttp.Cohttp.Generic.Client.Make.Base)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../../index.html">Index</a> » <a href="../../../../../index.html">cohttp</a> » <a href="../../../../index.html">Cohttp</a> » <a href="../../../index.html">Generic</a> » <a href="../../index.html">Client</a> » <a href="../index.html">Make</a> » Base</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make.Base</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-io"><a href="#type-io" class="anchor"></a><code><span><span class="keyword">type</span> <span>+'a io</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-with_context"><a href="#type-with_context" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a with_context</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-body"><a href="#type-body" class="anchor"></a><code><span><span class="keyword">type</span> body</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-map_context"><a href="#val-map_context" class="anchor"></a><code><span><span class="keyword">val</span> map_context : <span><span><span class="type-var">'a</span> <a href="#type-with_context">with_context</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span class="type-var">'b</span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-with_context">with_context</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-call"><a href="#val-call" class="anchor"></a><code><span><span class="keyword">val</span> call :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Base (cohttp.Cohttp.Generic.Client.Make.Base)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../../index.html">Index</a> » <a href="../../../../../index.html">cohttp</a> » <a href="../../../../index.html">Cohttp</a> » <a href="../../../index.html">Generic</a> » <a href="../../index.html">Client</a> » <a href="../index.html">Make</a> » Base</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make.Base</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-io"><a href="#type-io" class="anchor"></a><code><span><span class="keyword">type</span> <span>+'a io</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-with_context"><a href="#type-with_context" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a with_context</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-body"><a href="#type-body" class="anchor"></a><code><span><span class="keyword">type</span> body</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-map_context"><a href="#val-map_context" class="anchor"></a><code><span><span class="keyword">val</span> map_context : <span><span><span class="type-var">'a</span> <a href="#type-with_context">with_context</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span class="type-var">'b</span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-with_context">with_context</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-call"><a href="#val-call" class="anchor"></a><code><span><span class="keyword">val</span> call :
|
||||
<span><span>(<span><span class="optlabel">?headers</span>:<a href="../../../../../../http/Http/Header/index.html#type-t">Http.Header.t</a> <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?body</span>:<a href="#type-body">body</a> <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?chunked</span>:bool <span class="arrow">-></span></span>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp.Cohttp.Generic.Client.Make.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../../index.html">Index</a> » <a href="../../../../../index.html">cohttp</a> » <a href="../../../../index.html">Cohttp</a> » <a href="../../../index.html">Generic</a> » <a href="../../index.html">Client</a> » <a href="../index.html">Make</a> » IO</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../argument-1-Base/index.html#type-io">Base.io</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (cohttp.Cohttp.Generic.Client.Make.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../../../../index.html">Index</a> » <a href="../../../../../index.html">cohttp</a> » <a href="../../../../index.html">Cohttp</a> » <a href="../../../index.html">Generic</a> » <a href="../../index.html">Client</a> » <a href="../index.html">Make</a> » IO</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a t</span></span><span> = <span><span class="type-var">'a</span> <a href="../argument-1-Base/index.html#type-io">Base.io</a></span></span></code></div><div class="spec-doc"><p><code>'a t</code> represents a blocking monad state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-(>>=)"><a href="#val-(>>=)" class="anchor"></a><code><span><span class="keyword">val</span> (>>=) : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span>(<span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span>)</span> <span class="arrow">-></span></span> <span><span class="type-var">'b</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>a >>= b</code> will pass the result of <code>a</code> to the <code>b</code> function. This is a monadic <code>bind</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-return"><a href="#val-return" class="anchor"></a><code><span><span class="keyword">val</span> return : <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>return a</code> will construct a constant IO value.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-ic"><a href="#type-ic" class="anchor"></a><code><span><span class="keyword">type</span> ic</span></code></div><div class="spec-doc"><p><code>ic</code> represents an input channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-oc"><a href="#type-oc" class="anchor"></a><code><span><span class="keyword">type</span> oc</span></code></div><div class="spec-doc"><p><code>oc</code> represents an output channel</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-conn"><a href="#type-conn" class="anchor"></a><code><span><span class="keyword">type</span> conn</span></code></div><div class="spec-doc"><p><code>conn</code> represents the underlying network flow</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-refill"><a href="#val-refill" class="anchor"></a><code><span><span class="keyword">val</span> refill : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>[ `Ok <span>| `Eof</span> ]</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_input_buffer"><a href="#val-with_input_buffer" class="anchor"></a><code><span><span class="keyword">val</span> with_input_buffer :
|
||||
<span><a href="#type-ic">ic</a> <span class="arrow">-></span></span>
|
||||
<span><span class="label">f</span>:<span>(<span>string <span class="arrow">-></span></span> <span><span class="label">pos</span>:int <span class="arrow">-></span></span> <span><span class="label">len</span>:int <span class="arrow">-></span></span> <span class="type-var">'a</span> * int)</span> <span class="arrow">-></span></span>
|
||||
<span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read_line"><a href="#val-read_line" class="anchor"></a><code><span><span class="keyword">val</span> read_line : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span><span>string option</span> <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read_line ic</code> will read a single line terminated by CR or CRLF from the input channel <code>ic</code>. It returns <code>None</code> if EOF or other error condition is reached.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-read"><a href="#val-read" class="anchor"></a><code><span><span class="keyword">val</span> read : <span><a href="#type-ic">ic</a> <span class="arrow">-></span></span> <span>int <span class="arrow">-></span></span> <span>string <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>read ic len</code> will block until a maximum of <code>len</code> characters are read from the input channel <code>ic</code>. It returns an empty string if EOF or some other error condition occurs on the input channel, and can also return fewer than <code>len</code> characters if input buffering is not sufficient to satisfy the request.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-write"><a href="#val-write" class="anchor"></a><code><span><span class="keyword">val</span> write : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>string <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>write oc s</code> will block until the complete <code>s</code> string is written to the output channel <code>oc</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-flush"><a href="#val-flush" class="anchor"></a><code><span><span class="keyword">val</span> flush : <span><a href="#type-oc">oc</a> <span class="arrow">-></span></span> <span>unit <a href="#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>flush oc</code> will return when all previously buffered content from calling <a href="#val-write"><code>write</code></a> have been written to the output channel <code>oc</code>.</p></div></div></div></body></html>
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue