From 581b6954d344eaca2bfcdab663019796e852c778 Mon Sep 17 00:00:00 2001 From: Jan Uhlig Date: Wed, 1 Sep 2021 14:01:47 +0200 Subject: Update docs and modernize examples * Use the map form for transport options everywhere * Remove mentions of the list form for transport options * Use a state enter call instead of gen_statem:enter_loop/4 and proc_lib:start_link/3 in the tcp_reverse example * Take care of different EOLs in the tcp_reverse example * Mention state enter calls, the next_event action, and {continue, ...} in the docs for how to use gen_statem and gen_server --- doc/src/manual/ranch.asciidoc | 5 ----- doc/src/manual/ranch.child_spec.asciidoc | 3 --- doc/src/manual/ranch.get_transport_options.asciidoc | 5 ----- 3 files changed, 13 deletions(-) (limited to 'doc/src/manual') diff --git a/doc/src/manual/ranch.asciidoc b/doc/src/manual/ranch.asciidoc index 6dffb7f..26e0769 100644 --- a/doc/src/manual/ranch.asciidoc +++ b/doc/src/manual/ranch.asciidoc @@ -74,11 +74,6 @@ opts() = any() | transport_opts(any()) Transport or socket options. -It is possible to give the full transport options in a map -(see `transport_opts(SocketOpts)`), or only the socket options -(assuming they are not a map and no Ranch-specific option -needs to be given). - === ref() [source,erlang] diff --git a/doc/src/manual/ranch.child_spec.asciidoc b/doc/src/manual/ranch.child_spec.asciidoc index bd6c056..a904217 100644 --- a/doc/src/manual/ranch.child_spec.asciidoc +++ b/doc/src/manual/ranch.child_spec.asciidoc @@ -49,9 +49,6 @@ Transport options include the Ranch-specific options and the socket options. The listener's port number must be defined in the socket options. + -Socket options may be given directly if there are no -Ranch-specific options. -+ The available options for the built-in Ranch transports are documented in the link:man:ranch_tcp(3)[ranch_tcp(3)] and link:man:ranch_ssl(3)[ranch_ssl(3)] manuals. diff --git a/doc/src/manual/ranch.get_transport_options.asciidoc b/doc/src/manual/ranch.get_transport_options.asciidoc index 0214e0f..9b311da 100644 --- a/doc/src/manual/ranch.get_transport_options.asciidoc +++ b/doc/src/manual/ranch.get_transport_options.asciidoc @@ -24,11 +24,6 @@ The listener name. The current transport options are returned. -If the transport options were specified as only socket options (not a map) using -link:man:ranch:start_listener(3)[ranch:start_listener(3)] or -link:man:ranch:set_transport_options(3)[ranch:set_transport_options(3)], they -are returned as `#{socket_opts => SocketOpts}`. - == Examples .Get the current transport options -- cgit v1.2.3