From 9db28a09e8f7695f67297fff7f7144bac2061cc2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= <essen@ninenines.eu>
Date: Thu, 24 Nov 2016 20:19:28 +0100
Subject: Add ranch:info/0 and ranch:procs/2

Provides detailed information about Ranch listeners
---
 doc/src/manual/ranch.asciidoc | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

(limited to 'doc/src/manual/ranch.asciidoc')

diff --git a/doc/src/manual/ranch.asciidoc b/doc/src/manual/ranch.asciidoc
index 2e4f177..13380fd 100644
--- a/doc/src/manual/ranch.asciidoc
+++ b/doc/src/manual/ranch.asciidoc
@@ -111,6 +111,34 @@ ProtoOpts = any():: Current protocol options.
 
 Return the protocol options set for the given listener.
 
+=== info() -> [{Ref, [{Key, Value}]}]
+
+Ref = ref():: Listener name.
+Key = atom():: Information key.
+Value = any():: Information value.
+
+Return detailed information about all Ranch listeners.
+
+The following keys are defined:
+
+pid:: Pid of the listener's top-level supervisor.
+ip:: Interface Ranch listens on.
+port:: Port number Ranch listens on.
+num_acceptors:: Number of acceptor processes.
+max_connections:: Maximum number of connections.
+active_connections:: Number of active connections.
+all_connections:: Number of connections, including those removed from the count.
+transport:: Transport module.
+transport_options:: Transport options.
+protocol:: Protocol module.
+protocol_options:: Protocol options.
+
+=== procs(Ref, acceptors | connections) -> [pid()]
+
+Ref = ref():: Listener name.
+
+Return all acceptor or connection processes for one listener.
+
 === remove_connection(Ref) -> ok
 
 Ref = ref():: Listener name.
-- 
cgit v1.2.3

