blob: 7998189b173f1924f6d68d1679b063eb098a67fb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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)]
|