diff options
author | Loïc Hoguin <[email protected]> | 2018-07-18 17:24:41 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-07-18 17:24:41 +0200 |
commit | 8b4c6f4bf9880d59bbc012b6ba9d5e60c4f62b3a (patch) | |
tree | 8cfcf87f69be525252addd32d880abb8ad02a1ad /doc/src/manual/ranch.stop_listener.asciidoc | |
parent | a230411488fe2d8ae1e8bf414a4fe4ecf3662a83 (diff) | |
download | ranch-8b4c6f4bf9880d59bbc012b6ba9d5e60c4f62b3a.tar.gz ranch-8b4c6f4bf9880d59bbc012b6ba9d5e60c4f62b3a.tar.bz2 ranch-8b4c6f4bf9880d59bbc012b6ba9d5e60c4f62b3a.zip |
Add one manual per function for the ranch module
Also review and update the ranch(7) manual and fix a few specs.
Diffstat (limited to 'doc/src/manual/ranch.stop_listener.asciidoc')
-rw-r--r-- | doc/src/manual/ranch.stop_listener.asciidoc | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/doc/src/manual/ranch.stop_listener.asciidoc b/doc/src/manual/ranch.stop_listener.asciidoc new file mode 100644 index 0000000..6de24f5 --- /dev/null +++ b/doc/src/manual/ranch.stop_listener.asciidoc @@ -0,0 +1,58 @@ += ranch:stop_listener(3) + +== Name + +ranch:stop_listener - Stop a listener + +== Description + +[source,erlang] +---- +stop_listener(Ref :: ranch_ref()) + -> ok | {error, not_found} +---- + +Stop a listener. + +The listener is stopped gracefully, first by closing the +listening port, then by stopping the connection processes. +These processes are stopped according to the `shutdown` +transport option, which may be set to brutally kill all +connection processes or give them some time to stop properly. + +In order for the connection processes to exit gracefully, +they need to trap exit signals and stop before the configured +shutdown timeout. If greater control over the shutdown is +required the functions link:man:ranch:suspend_listener(3)[ranch:suspend_listener(3)] +and link:man:ranch:wait_for_connections(3)[ranch:wait_for_connections(3)] +can be used. + +This function does not return until the listener is +completely stopped. + +== Arguments + +Ref:: + +The listener name. + +== Return value + +The atom `ok` is returned on success. + +An error tuple is returned when the listener is not found. + +== Examples + +.Stop a listener +[source,erlang] +---- +ok = ranch:stop_listener(example). +---- + +== See also + +link:man:ranch:start_listener(3)[ranch:start_listener(3)], +link:man:ranch:child_spec(3)[ranch:child_spec(3)], +link:man:ranch:suspend_listener(3)[ranch:suspend_listener(3)], +link:man:ranch(3)[ranch(3)] |