aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/guide/sub_protocols.asciidoc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-09-14 18:51:11 +0200
committerLoïc Hoguin <[email protected]>2016-09-14 18:51:11 +0200
commit31cabe0fb98b4c75cb088761ba5ad53dbd2285ee (patch)
treef38d722f59530b0db689a4c06f5339620a1e5f6f /doc/src/guide/sub_protocols.asciidoc
parenta231216b07876293dbcfde020cb0228510c5064d (diff)
downloadcowboy-31cabe0fb98b4c75cb088761ba5ad53dbd2285ee.tar.gz
cowboy-31cabe0fb98b4c75cb088761ba5ad53dbd2285ee.tar.bz2
cowboy-31cabe0fb98b4c75cb088761ba5ad53dbd2285ee.zip
Use spaces in snippets in the guide
Diffstat (limited to 'doc/src/guide/sub_protocols.asciidoc')
-rw-r--r--doc/src/guide/sub_protocols.asciidoc6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/src/guide/sub_protocols.asciidoc b/doc/src/guide/sub_protocols.asciidoc
index 5332eec..2ab96bc 100644
--- a/doc/src/guide/sub_protocols.asciidoc
+++ b/doc/src/guide/sub_protocols.asciidoc
@@ -17,7 +17,7 @@ is handled by the sub protocol.
[source,erlang]
----
init(Req, State) ->
- {cowboy_websocket, Req, State}.
+ {cowboy_websocket, Req, State}.
----
The return value may also have a `Timeout` value and/or the
@@ -34,7 +34,7 @@ hibernation:
[source,erlang]
----
init(Req, State) ->
- {my_protocol, Req, State, 5000, hibernate}.
+ {my_protocol, Req, State, 5000, hibernate}.
----
If a sub protocol does not make use of these options, it should
@@ -59,7 +59,7 @@ timeout and hibernate values.
[source,erlang]
----
upgrade(Req, Env, Handler, HandlerOpts, Timeout, Hibernate) ->
- %% Sub protocol code here.
+ %% Sub protocol code here.
----
This callback is expected to behave like a middleware and to