From 9993923c40b96ab07752ec36692dc09c4c7648e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 24 Dec 2012 16:09:40 +0100 Subject: Add ranch:set_max_connections/2 and get_max_connections/1 --- guide/listeners.md | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'guide/listeners.md') diff --git a/guide/listeners.md b/guide/listeners.md index 32fddde..1209706 100644 --- a/guide/listeners.md +++ b/guide/listeners.md @@ -172,6 +172,16 @@ ranch_listener:remove_connection(ListenerPid). As seen in the chapter covering protocols, this pid is received as the first argument of the protocol's `start_link/4` callback. +You can modify the `max_connections` value on a running listener by +using the `ranch:set_max_connections/2` function, with the name of the +listener as first argument and the new value as the second. + +``` erlang +ranch:set_max_connections(tcp_echo, MaxConns). +``` + +The change will occur immediately. + Upgrading --------- -- cgit v1.2.3