tiny_httpd/dev/tiny_httpd_eio/Tiny_httpd_eio/index.html
2023-07-06 02:08:04 +00:00

14 lines
No EOL
3.1 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>Tiny_httpd_eio (tiny_httpd_eio.Tiny_httpd_eio)</title><link rel="stylesheet" href="../../odoc.support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../odoc.support/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">tiny_httpd_eio</a> &#x00BB; Tiny_httpd_eio</nav><header class="odoc-preamble"><h1>Module <code><span>Tiny_httpd_eio</span></code></h1><p>Tiny httpd EIO backend.</p><p>This replaces the threads + Unix blocking syscalls of <a href="../../tiny_httpd/Tiny_httpd_server/index.html"><code>Tiny_httpd_server</code></a> with an Eio-based cooperative system.</p><p><b>NOTE</b>: this is very experimental and will absolutely change over time, especially since Eio itself is also subject to change.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> NEXT_RELEASE</li></ul></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-with_args"><a href="#type-with_args" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a with_args</span></span><span> =
<span>?addr:string <span class="arrow">&#45;&gt;</span></span>
<span>?port:int <span class="arrow">&#45;&gt;</span></span>
<span>?max_connections:int <span class="arrow">&#45;&gt;</span></span>
<span>stdenv:<span class="xref-unresolved">Eio_unix</span>.Stdenv.base <span class="arrow">&#45;&gt;</span></span>
<span>sw:<span class="xref-unresolved">Eio</span>.Switch.t <span class="arrow">&#45;&gt;</span></span>
<span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-io_backend"><a href="#val-io_backend" class="anchor"></a><code><span><span class="keyword">val</span> io_backend : <span><span>(<span>unit <span class="arrow">&#45;&gt;</span></span> <span>(<span class="keyword">module</span> <a href="../../tiny_httpd/Tiny_httpd_server/module-type-IO_BACKEND/index.html">Tiny_httpd_server.IO_BACKEND</a>)</span>)</span> <a href="#type-with_args">with_args</a></span></span></code></div><div class="spec-doc"><p>Create a server</p></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>(<span>?buf_size:int <span class="arrow">&#45;&gt;</span></span>
<span>?middlewares:
<span><span>(<span>[ `Encoding <span><span>| `Stage</span> of int</span> ]</span> * <a href="../../tiny_httpd/Tiny_httpd_server/Middleware/index.html#type-t">Tiny_httpd_server.Middleware.t</a>)</span> list</span> <span class="arrow">&#45;&gt;</span></span>
<span>unit <span class="arrow">&#45;&gt;</span></span>
<a href="../../tiny_httpd/Tiny_httpd_server/index.html#type-t">Tiny_httpd_server.t</a>)</span>
<a href="#type-with_args">with_args</a></span></span></code></div><div class="spec-doc"><p>Create a server</p></div></div></div></body></html>