From 109c63d0e76ca6248863932c7a9957f8093cfaf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 1 Apr 2013 17:04:21 +0200 Subject: Remove ranch_listener and replace ListenerPid by Ref We just don't need this process anymore. Less, simpler code! API changes: * Protocols start_link first argument is now Ref instead of ListenerPid * ranch:accept_ack/1 argument is now Ref instead of ListenerPid * ranch_listener:remove_connection/1 becomes ranch:remove_connection/1 and its argument is now Ref instead of ListenerPid Ref is the name of the listener given as first argument to start_listener/6. --- guide/listeners.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'guide/listeners.md') diff --git a/guide/listeners.md b/guide/listeners.md index 1209706..a9ac4a0 100644 --- a/guide/listeners.md +++ b/guide/listeners.md @@ -162,11 +162,11 @@ connections are mostly waiting for messages, then they don't consume much resources and can safely be removed from the count. To remove the connection from the count, you must call the -`ranch_listener:remove_connection/1` from within the connection process, -with the listener pid as the only argument. +`ranch:remove_connection/1` from within the connection process, +with the name of the listener as the only argument. ``` erlang -ranch_listener:remove_connection(ListenerPid). +ranch:remove_connection(Ref). ``` As seen in the chapter covering protocols, this pid is received as the -- cgit v1.2.3