Ranch 1.6 added the ability to suspend and resume listeners. It also deprecates a number of features and add interfaces that will be used in Ranch 2.0.
Ranch 1.6 is compatible with Erlang/OTP 18.0 onward. Support for older releases has been removed.
Socketargument given when the protocol starts has been deprecated. In Ranch 2.0 the socket will be obtainable only by calling
socket_optsvalue. When there are only socket options they can be passed to Ranch directly as a convenience.
ack_timeoutwas renamed to
handshake_timeoutin the map type.
cacertssocket option is now silenced in error logs just like the
ranch_supusing the OTP application environment. This feature will remain undocumented unless there is popular demand for it.
loggerthat allows configuring which logger module will be used. The logger module must follow the interface of the new
loggermodule in Erlang/OTP 21, or be set to
error_loggerto keep the old behavior.
Transport:handshake/2,3which deprecates and will replace
Transport:accept_ack/1in Ranch 2.0. It returns a new socket and can therefore be used for implementing TLS upgrade mechanisms.
ranch:resume_listener/1were added. In addition the function
ranch:get_state/1can be used to obtain the running state of a listener.
ranch:handshake/1,2was added to replace the function
Transport:sendfile/2,4,5have been corrected. The type used for the filename was too restricting.
Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:
Recurring payment options are also available via GitHub Sponsors. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.