summaryrefslogtreecommitdiffstats
path: root/docs/en/cowboy/2.6/guide/loop_handlers/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/en/cowboy/2.6/guide/loop_handlers/index.html')
-rw-r--r--docs/en/cowboy/2.6/guide/loop_handlers/index.html10
1 files changed, 6 insertions, 4 deletions
diff --git a/docs/en/cowboy/2.6/guide/loop_handlers/index.html b/docs/en/cowboy/2.6/guide/loop_handlers/index.html
index 25bf0f66..299bfa89 100644
--- a/docs/en/cowboy/2.6/guide/loop_handlers/index.html
+++ b/docs/en/cowboy/2.6/guide/loop_handlers/index.html
@@ -70,7 +70,7 @@
<h2 id="_initialization">Initialization</h2>
<p>The <code>init/2</code> function must return a <code>cowboy_loop</code> tuple to enable loop handler behavior. This tuple may optionally contain the atom <code>hibernate</code> to make the process enter hibernation until a message is received.</p>
<p>This snippet enables the loop handler:</p>
-<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -78,7 +78,7 @@ http://www.gnu.org/software/src-highlite -->
{<font color="#FF6600">cowboy_loop</font>, <font color="#009900">Req</font>, <font color="#009900">State</font>}<font color="#990000">.</font></tt></pre>
</div></div>
<p>This also makes the process hibernate:</p>
-<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -88,7 +88,7 @@ http://www.gnu.org/software/src-highlite -->
<h2 id="_receive_loop">Receive loop</h2>
<p>Once initialized, Cowboy will wait for messages to arrive in the process&apos; mailbox. When a message arrives, Cowboy calls the <code>info/3</code> function with the message, the Req object and the handler&apos;s state.</p>
<p>The following snippet sends a reply when it receives a <code>reply</code> message from another process, or waits for another message otherwise.</p>
-<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -106,7 +106,7 @@ http://www.gnu.org/software/src-highlite -->
<h2 id="_streaming_loop">Streaming loop</h2>
<p>Another common case well suited for loop handlers is streaming data received in the form of Erlang messages. This can be done by initiating a chunked reply in the <code>init/2</code> callback and then using <code>cowboy_req:chunk/2</code> every time a message is received.</p>
<p>The following snippet does exactly that. As you can see a chunk is sent every time an <code>event</code> message is received, and the loop is stopped by sending an <code>eof</code> message.</p>
-<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -183,6 +183,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/cowboy/2.7/guide">2.7</a></li>
+
<li><a href="/docs/en/cowboy/2.6/guide">2.6</a></li>
<li><a href="/docs/en/cowboy/2.5/guide">2.5</a></li>