aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/manual/cowboy.stop_listener.asciidoc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-09-25 17:32:41 +0200
committerLoïc Hoguin <[email protected]>2016-09-25 17:32:41 +0200
commit04247240629f1b9807feca34fde6de89286d4774 (patch)
tree3cb7cd41517b82d079d43a87e4902d39f4cd2c21 /doc/src/manual/cowboy.stop_listener.asciidoc
parent31cabe0fb98b4c75cb088761ba5ad53dbd2285ee (diff)
downloadcowboy-04247240629f1b9807feca34fde6de89286d4774.tar.gz
cowboy-04247240629f1b9807feca34fde6de89286d4774.tar.bz2
cowboy-04247240629f1b9807feca34fde6de89286d4774.zip
Update manual for the cowboy module
This commit separates the documentation of the functions into separate manual pages, with at least one example per function and a lot more details about parameters, return values and related functions and modules. It also includes a changelog indicating when the function was added or changed. The inspiration for this comes mainly from the PHP documentation and feedback from users.
Diffstat (limited to 'doc/src/manual/cowboy.stop_listener.asciidoc')
-rw-r--r--doc/src/manual/cowboy.stop_listener.asciidoc55
1 files changed, 55 insertions, 0 deletions
diff --git a/doc/src/manual/cowboy.stop_listener.asciidoc b/doc/src/manual/cowboy.stop_listener.asciidoc
new file mode 100644
index 0000000..7998189
--- /dev/null
+++ b/doc/src/manual/cowboy.stop_listener.asciidoc
@@ -0,0 +1,55 @@
+= cowboy:stop_listener(3)
+
+== Name
+
+cowboy:stop_listener - Stop the given listener
+
+== Description
+
+[source,erlang]
+----
+stop_listener(Name :: ranch:ref())
+ -> ok | {error, not_found}.
+----
+
+Stop a previously started listener.
+
+Alias of link:man:ranch:stop_listener(3)[ranch:stop_listener(3)].
+
+== Arguments
+
+Name::
+
+The name of the listener to be stopped.
++
+The name of the listener is the first argument given to the
+link:man:cowboy:start_clear(3)[cowboy:start_clear(3)],
+link:man:cowboy:start_tls(3)[cowboy:start_tls(3)] or
+link:man:ranch:start_listener(3)[ranch:start_listener(3)] function.
+
+== Return value
+
+The atom `ok` is returned on success.
+
+The `{error, not_found}` tuple is returned when the listener
+does not exist.
+
+== Changelog
+
+* *1.0*: Function introduced.
+
+== Examples
+
+.Stop a listener
+[source,erlang]
+----
+ok = cowboy:stop_listener(example).
+----
+
+== See also
+
+link:man:cowboy(3)[cowboy(3)],
+link:man:cowboy:start_clear(3)[cowboy:start_clear(3)],
+link:man:cowboy:start_tls(3)[cowboy:start_tls(3)],
+link:man:ranch(3)[ranch(3)],
+link:man:ranch:start_listener(3)[ranch:start_listener(3)]