diff options
author | Loïc Hoguin <[email protected]> | 2018-06-13 09:54:12 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-06-13 09:54:12 +0200 |
commit | 92b54aacc0de5446dd5497c39897b0bbff72e626 (patch) | |
tree | c3a98cfec636d1271f5804e5c19b35b208bba00d /docs/en/gun/1.0/manual/gun.data/index.html | |
parent | 8b5c3dc972b99f174750123c9e4abc96259c34a9 (diff) | |
download | ninenines.eu-92b54aacc0de5446dd5497c39897b0bbff72e626.tar.gz ninenines.eu-92b54aacc0de5446dd5497c39897b0bbff72e626.tar.bz2 ninenines.eu-92b54aacc0de5446dd5497c39897b0bbff72e626.zip |
Rebuild using Asciideck
Diffstat (limited to 'docs/en/gun/1.0/manual/gun.data/index.html')
-rw-r--r-- | docs/en/gun/1.0/manual/gun.data/index.html | 130 |
1 files changed, 35 insertions, 95 deletions
diff --git a/docs/en/gun/1.0/manual/gun.data/index.html b/docs/en/gun/1.0/manual/gun.data/index.html index 8382616e..97b689bd 100644 --- a/docs/en/gun/1.0/manual/gun.data/index.html +++ b/docs/en/gun/1.0/manual/gun.data/index.html @@ -62,119 +62,59 @@ <h1 class="lined-header"><span>gun:data(3)</span></h1> -<div class="sect1"> <h2 id="_name">Name</h2> -<div class="sectionbody"> -<div class="paragraph"><p>gun:data - Stream the body of a request</p></div> -</div> -</div> -<div class="sect1"> +<p>gun:data - Stream the body of a request</p> <h2 id="_description">Description</h2> -<div class="sectionbody"> -<div class="listingblock"> -<div class="content"><!-- Generator: GNU source-highlight +<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8 by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -<pre><tt><span style="font-weight: bold"><span style="color: #000000">data</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">IsFin</span>, <span style="color: #009900">Data</span>) <span style="color: #990000">-></span> <span style="color: #FF6600">ok</span> - -<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>() -<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>() -<span style="color: #009900">IsFin</span> <span style="color: #990000">::</span> <span style="color: #FF6600">fin</span> | <span style="color: #FF6600">nofin</span> -<span style="color: #009900">Data</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()</tt></pre></div></div> -<div class="paragraph"><p>Stream the body of a request.</p></div> -<div class="paragraph"><p>This function can only be used if the original request -had headers indicating that a body would be streamed.</p></div> -<div class="paragraph"><p>All calls to this function must use the <code>nofin</code> flag -except for the last which must use <code>fin</code> to indicate -the end of the request body.</p></div> -<div class="paragraph"><p>Empty data is allowed regardless of the value of <code>IsFin</code>. -Gun may or may not send empty data chunks, however.</p></div> -</div> -</div> -<div class="sect1"> +<pre><tt><b><font color="#000000">data</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#009900">IsFin</font>, <font color="#009900">Data</font>) <font color="#990000">-></font> <font color="#FF6600">ok</font> + +<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>() +<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>() +<font color="#009900">IsFin</font> <font color="#990000">::</font> <font color="#FF6600">fin</font> | <font color="#FF6600">nofin</font> +<font color="#009900">Data</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()</tt></pre> +</div></div> +<p>Stream the body of a request.</p> +<p>This function can only be used if the original request had headers indicating that a body would be streamed.</p> +<p>All calls to this function must use the <code>nofin</code> flag except for the last which must use <code>fin</code> to indicate the end of the request body.</p> +<p>Empty data is allowed regardless of the value of <code>IsFin</code>. Gun may or may not send empty data chunks, however.</p> <h2 id="_arguments">Arguments</h2> -<div class="sectionbody"> -<div class="dlist"><dl> -<dt class="hdlist1"> -ConnPid -</dt> -<dd> -<p> -The pid of the Gun connection process. -</p> +<dl><dt>ConnPid</dt> +<dd><p>The pid of the Gun connection process.</p> </dd> -<dt class="hdlist1"> -StreamRef -</dt> -<dd> -<p> -Identifier of the stream for the original request. -</p> +<dt>StreamRef</dt> +<dd><p>Identifier of the stream for the original request.</p> </dd> -<dt class="hdlist1"> -IsFin -</dt> -<dd> -<p> -Whether this message terminates the request. -</p> +<dt>IsFin</dt> +<dd><p>Whether this message terminates the request.</p> </dd> -<dt class="hdlist1"> -Data -</dt> -<dd> -<p> -All or part of the response body. -</p> +<dt>Data</dt> +<dd><p>All or part of the response body.</p> </dd> -</dl></div> -</div> -</div> -<div class="sect1"> +</dl> <h2 id="_return_value">Return value</h2> -<div class="sectionbody"> -<div class="paragraph"><p>The atom <code>ok</code> is returned.</p></div> -</div> -</div> -<div class="sect1"> +<p>The atom <code>ok</code> is returned.</p> <h2 id="_changelog">Changelog</h2> -<div class="sectionbody"> -<div class="ulist"><ul> -<li> -<p> -<strong>1.0</strong>: Function introduced. -</p> +<ul><li><strong>1.0</strong>: Function introduced. </li> -</ul></div> -</div> -</div> -<div class="sect1"> +</ul> <h2 id="_examples">Examples</h2> -<div class="sectionbody"> -<div class="listingblock"> -<div class="title">Stream the body of a request</div> -<div class="content"><!-- Generator: GNU source-highlight +<div class="listingblock"><div class="title">Stream the body of a request</div> +<div class="content"><!-- Generator: GNU source-highlight 3.1.8 by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -<pre><tt><span style="color: #009900">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:put</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/lang/fr_FR/hello"</span>, [ - {<span style="color: #990000"><<</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">>></span>, <span style="color: #990000"><<</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">>></span>} -])<span style="color: #990000">.</span> -<span style="font-weight: bold"><span style="color: #000000">gun:data</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #990000"><<</span><span style="color: #FF0000">"Bonjour !\n"</span><span style="color: #990000">>></span>)<span style="color: #990000">.</span> -<span style="font-weight: bold"><span style="color: #000000">gun:data</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #FF6600">fin</span>, <span style="color: #990000"><<</span><span style="color: #FF0000">"Bonsoir !\n"</span><span style="color: #990000">>></span>)<span style="color: #990000">.</span></tt></pre></div></div> -</div> -</div> -<div class="sect1"> +<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:put</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/lang/fr_FR/hello"</font>, [ + {<font color="#990000"><<</font><font color="#FF0000">"content-type"</font><font color="#990000">>></font>, <font color="#990000"><<</font><font color="#FF0000">"text/plain"</font><font color="#990000">>></font>} +])<font color="#990000">.</font> +<b><font color="#000000">gun:data</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#FF6600">nofin</font>, <font color="#990000"><<</font><font color="#FF0000">"Bonjour !\n"</font><font color="#990000">>></font>)<font color="#990000">.</font> +<b><font color="#000000">gun:data</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#FF6600">fin</font>, <font color="#990000"><<</font><font color="#FF0000">"Bonsoir !\n"</font><font color="#990000">>></font>)<font color="#990000">.</font></tt></pre> +</div></div> <h2 id="_see_also">See also</h2> -<div class="sectionbody"> -<div class="paragraph"><p><a href="../gun">gun(3)</a>, -<a href="../gun.patch">gun:patch(3)</a>, -<a href="../gun.post">gun:post(3)</a>, -<a href="../gun.put">gun:put(3)</a>, -<a href="../gun.request">gun:request(3)</a></p></div> -</div> -</div> +<p><a href="../gun">gun(3)</a>, <a href="../gun.patch">gun:patch(3)</a>, <a href="../gun.post">gun:post(3)</a>, <a href="../gun.put">gun:put(3)</a>, <a href="../gun.request">gun:request(3)</a></p> + |