aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/manual/ranch.remove_connection.asciidoc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-07-18 17:24:41 +0200
committerLoïc Hoguin <[email protected]>2018-07-18 17:24:41 +0200
commit8b4c6f4bf9880d59bbc012b6ba9d5e60c4f62b3a (patch)
tree8cfcf87f69be525252addd32d880abb8ad02a1ad /doc/src/manual/ranch.remove_connection.asciidoc
parenta230411488fe2d8ae1e8bf414a4fe4ecf3662a83 (diff)
downloadranch-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.remove_connection.asciidoc')
-rw-r--r--doc/src/manual/ranch.remove_connection.asciidoc46
1 files changed, 46 insertions, 0 deletions
diff --git a/doc/src/manual/ranch.remove_connection.asciidoc b/doc/src/manual/ranch.remove_connection.asciidoc
new file mode 100644
index 0000000..59f79f1
--- /dev/null
+++ b/doc/src/manual/ranch.remove_connection.asciidoc
@@ -0,0 +1,46 @@
+= ranch:remove_connection(3)
+
+== Name
+
+ranch:remove_connection - Remove connection from the count
+
+== Description
+
+[source,erlang]
+----
+remove_connection(Ref :: ranch:ref()) -> ok
+----
+
+Remove connection from the count.
+
+This connection will no longer be included in the count when
+limiting the number of connections. This can be useful in a
+mixed environment where some connections are active and others
+are passive. Passive connections spend most of their time idling
+and are not consuming much resources.
+
+This function may only be called from a connection process.
+
+== Arguments
+
+Ref::
+
+The listener name.
+
+== Return value
+
+The atom `ok` is always returned. It can be safely ignored.
+
+== Examples
+
+.Remove the connection process from the count
+[source,erlang]
+----
+ranch:remove_connection(example).
+----
+
+== See also
+
+link:man:ranch:start_listener(3)[ranch:start_listener(3)],
+link:man:ranch:handshake(3)[ranch:handshake(3)],
+link:man:ranch(3)[ranch(3)]