Skip to content

Commit

Permalink
Update happy-eyeballs doc to 1.2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
dinosaure committed Aug 23, 2024
1 parent e9c4f07 commit a35ff61
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 5 deletions.
34 changes: 34 additions & 0 deletions happy-eyeballs-miou-unix/Happy_eyeballs_miou_unix/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Happy_eyeballs_miou_unix (happy-eyeballs-miou-unix.Happy_eyeballs_miou_unix)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.2"/><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">happy-eyeballs-miou-unix</a> &#x00BB; Happy_eyeballs_miou_unix</nav><header class="odoc-preamble"><h1>Module <code><span>Happy_eyeballs_miou_unix</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-daemon"><a href="#type-daemon" class="anchor"></a><code><span><span class="keyword">type</span> daemon</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 type anchored" id="type-getaddrinfo"><a href="#type-getaddrinfo" class="anchor"></a><code><span><span class="keyword">type</span> getaddrinfo</span><span> =
<span><span>[ `A <span>| `AAAA</span> ]</span> <span class="arrow">&#45;&gt;</span></span>
<span><span><span>[ `host ]</span> <span class="xref-unresolved">Domain_name</span>.t</span> <span class="arrow">&#45;&gt;</span></span>
<span><span>(<span class="xref-unresolved">Ipaddr</span>.Set.t, <span>[ <span>`Msg of string</span> ]</span>)</span> <span class="xref-unresolved">Stdlib</span>.result</span></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">?happy_eyeballs</span>:<a href="../../happy-eyeballs/Happy_eyeballs/index.html#type-t">Happy_eyeballs.t</a> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?getaddrinfo</span>:<a href="#type-getaddrinfo">getaddrinfo</a> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?timer_interval</span>:int64 <span class="arrow">&#45;&gt;</span></span>
<span>unit <span class="arrow">&#45;&gt;</span></span>
<a href="#type-daemon">daemon</a> * <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p><code>make ()</code> allocates a new happy-eyeballs <i>daemon</i> in parallel which must be de-allocated with <a href="#val-kill"><code>kill</code></a> at the end of your whole process. Otherwise, Miou will complain that some tasks still exist. You can check <a href="../../happy-eyeballs/Happy_eyeballs/index.html#val-create"><code>Happy_eyeballs.create</code></a> for more informations about optional arguments.</p><p>The happy-eyeball stack is able to give a connected socket only from IP addresses. It does not (yet) resolve domain-names. Only <a href="#val-connect_ip"><code>connect_ip</code></a> is usable. If you have a <code>getaddrinfo</code> function, you can then inject it into the happy-eyeball daemon to enable it to resolve domain names.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-inject"><a href="#val-inject" class="anchor"></a><code><span><span class="keyword">val</span> inject : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-getaddrinfo">getaddrinfo</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>inject t getaddrinfo</code> injects a DNS resolver into the given <i>happy-eyeballs</i> <code>t</code> instance. Initially, the <i>happy-eyeballs</i> instance (created by <a href="#val-create"><code>create</code></a>) can not resolve domain-name. When the user is able to resolve a domain-name (via the DNS protocol for example), he/she can <i>inject</i> its resolver into the <i>happy-eyeballs</i> instance.</p><p>Only after injection the user can use <a href="#val-connect_host"><code>connect_host</code></a> and <a href="#val-connect"><code>connect</code></a>.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <code>Invalid_argument</code> <p>if you try to use more than once this function.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-kill"><a href="#val-kill" class="anchor"></a><code><span><span class="keyword">val</span> kill : <span><a href="#type-daemon">daemon</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>kill daemon</code> kills properly the happy-eyeball daemon.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-connect_ip"><a href="#val-connect_ip" class="anchor"></a><code><span><span class="keyword">val</span> connect_ip :
<span><span class="optlabel">?aaaa_timeout</span>:int64 <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?connect_delay</span>:int64 <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?connect_timeout</span>:int64 <span class="arrow">&#45;&gt;</span></span>
<span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><span>(<span class="xref-unresolved">Ipaddr</span>.t * int)</span> list</span> <span class="arrow">&#45;&gt;</span></span>
<span><span>(<span>(<span class="xref-unresolved">Ipaddr</span>.t * int)</span> * <span class="xref-unresolved">Miou_unix</span>.file_descr, <span>[&gt; <span>`Msg of string</span> ]</span>)</span> <span class="xref-unresolved">Stdlib</span>.result</span></span></code></div><div class="spec-doc"><p><code>connect_ip t addresses</code> establishes a connection to <code>addresses</code>. The timeouts and delays are specified in nanoseconds, and are by default the value defined when constructing <code>t</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-connect_host"><a href="#val-connect_host" class="anchor"></a><code><span><span class="keyword">val</span> connect_host :
<span><span class="optlabel">?aaaa_timeout</span>:int64 <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?connect_delay</span>:int64 <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?connect_timeout</span>:int64 <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?resolve_timeout</span>:int64 <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?resolve_retries</span>:int <span class="arrow">&#45;&gt;</span></span>
<span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><span>[ `host ]</span> <span class="xref-unresolved">Domain_name</span>.t</span> <span class="arrow">&#45;&gt;</span></span>
<span><span>int list</span> <span class="arrow">&#45;&gt;</span></span>
<span><span>(<span>(<span class="xref-unresolved">Ipaddr</span>.t * int)</span> * <span class="xref-unresolved">Miou_unix</span>.file_descr, <span>[&gt; <span>`Msg of string</span> ]</span>)</span> <span class="xref-unresolved">Stdlib</span>.result</span></span></code></div><div class="spec-doc"><p><code>connect_host t host ports</code> establishes a connection to <code>host</code> on <code>ports</code> (tried in sequence).</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <code>Failure</code> <p>if <code>ports</code> is an empty list.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-connect"><a href="#val-connect" class="anchor"></a><code><span><span class="keyword">val</span> connect :
<span><span class="optlabel">?aaaa_timeout</span>:int64 <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?connect_delay</span>:int64 <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?connect_timeout</span>:int64 <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?resolve_timeout</span>:int64 <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?resolve_retries</span>:int <span class="arrow">&#45;&gt;</span></span>
<span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span>
<span>string <span class="arrow">&#45;&gt;</span></span>
<span><span>int list</span> <span class="arrow">&#45;&gt;</span></span>
<span><span>(<span>(<span class="xref-unresolved">Ipaddr</span>.t * int)</span> * <span class="xref-unresolved">Miou_unix</span>.file_descr, <span>[&gt; <span>`Msg of string</span> ]</span>)</span> <span class="xref-unresolved">Stdlib</span>.result</span></span></code></div><div class="spec-doc"><p><code>connect t host ports</code> establishes a connection to <code>host</code> on <code>ports</code>, which may be a host name or an IP address.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <code>Failure</code> <p>if <code>ports</code> is an empty list.</p></li></ul></div></div></div></body></html>
2 changes: 2 additions & 0 deletions happy-eyeballs-miou-unix/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>index (happy-eyeballs-miou-unix.index)</title><meta charset="utf-8"/><link rel="stylesheet" href="../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.2"/><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> – happy-eyeballs-miou-unix</nav><header class="odoc-preamble"><h1 id="happy-eyeballs-miou-unix-index"><a href="#happy-eyeballs-miou-unix-index" class="anchor"></a>happy-eyeballs-miou-unix index</h1></header><nav class="odoc-toc"><ul><li><a href="#library-happy-eyeballs-miou-unix">Library happy-eyeballs-miou-unix</a></li></ul></nav><div class="odoc-content"><h2 id="library-happy-eyeballs-miou-unix"><a href="#library-happy-eyeballs-miou-unix" class="anchor"></a>Library happy-eyeballs-miou-unix</h2><p>The entry point of this library is the module: <a href="Happy_eyeballs_miou_unix/index.html"><code>Happy_eyeballs_miou_unix</code></a>.</p></div></body></html>
Loading

0 comments on commit a35ff61

Please sign in to comment.