From e8d6401741021f76988091e6dc633afb65ffbe7b Mon Sep 17 00:00:00 2001 From: juhlig Date: Fri, 21 Jun 2019 16:01:22 +0200 Subject: Embedded listeners depending on ranch_server --- doc/src/manual/ranch.child_spec.asciidoc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/src/manual/ranch.child_spec.asciidoc b/doc/src/manual/ranch.child_spec.asciidoc index 9fdf65a..bd6c056 100644 --- a/doc/src/manual/ranch.child_spec.asciidoc +++ b/doc/src/manual/ranch.child_spec.asciidoc @@ -16,18 +16,20 @@ child_spec(Ref :: ranch_ref(), -> supervisor:child_spec() ---- -Build child specifications for a new listener. +Build child specifications for a new listener which can +be embedded directly in an application's supervision +tree. -This function can be used to embed a listener directly -in an application's supervision tree. +The actual listener is placed under a supervisor which +monitors `ranch_server` via a proxy process and will +restart the listener if `ranch_server` crashes. == Arguments Ref:: The listener name is used to refer to this listener in -future calls, for example when stopping it or when -updating the configuration. +future calls, for example when updating the configuration. + It can be any Erlang term. An atom is generally good enough, for example `api`, `my_app_clear` or `my_app_tls`. @@ -74,6 +76,8 @@ Child specifications are returned. == Changelog +* *2.0*: The actual listener is placed under a supervisor in order to + restart the listener if `ranch_server` crashes. * *2.0*: The `TransOpts` argument must no longer contain Ranch-specific options if given as a list. Use a map. * *1.4*: The `NumAcceptors` argument was moved to the transport options. -- cgit v1.2.3