ocaml-opentelemetry/cohttp-lwt/Cohttp_lwt/S/index.html
2025-01-31 01:39:34 +00:00

2 lines
3.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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 2.4.4"/><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">cohttp-lwt</a> &#x00BB; <a href="../index.html">Cohttp_lwt</a> &#x00BB; 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-Client"><a href="#module-type-Client" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-Client/index.html">Client</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>The <code>Client</code> module implements non-pipelined single HTTP client calls. Each call will open a separate <a href="module-type-Net/index.html"><code>Net</code></a> connection. For best results, the <a href="../Body/index.html"><code>Body</code></a> that is returned should be consumed in order to close the file descriptor in a timely fashion. It will still be finalized by a GC hook if it is not used up, but this can take some additional time to happen.</p></div></div><div class="odoc-spec"><div class="spec module-type anchored" id="module-type-Server"><a href="#module-type-Server" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-Server/index.html">Server</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>The <code>Server</code> module implements a pipelined HTTP/1.1 server.</p></div></div></div></body></html>