set_transport_options(Ref :: ranch:ref(), TransOpts :: ranch:opts()) -> ok | {error, Reason :: term()}
ranch:set_transport_options - Set the transport options
set_transport_options(Ref :: ranch:ref(), TransOpts :: ranch:opts()) -> ok | {error, Reason :: term()}
Set the transport options.
Changes to the following options will take effect...
max_connections
handshake_timeout
shutdown
num_acceptors
num_listen_sockets
socket_opts
connection_type
num_conns_sups
logger
The listener name.
The new transport options.
The atom ok
is returned on success.
An error tuple is returned on failure, for example if the given transport options contain invalid values.
TransOpts
argument must no longer contain Ranch-specific options if given as a list. Use a map.
Ref = example, ok = ranch:suspend_listener(Ref), ok = ranch:set_transport_options(Ref, TransOpts), ok = ranch:resume_listener(Ref).
ranch:suspend_listener(3), ranch:resume_listener(3), ranch:get_transport_options(3), ranch:set_max_connections(3), ranch:set_protocol_options(3), ranch(3)
Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:
Recurring payment options are also available via BountySource. These funds are used to cover the recurring expenses like dedicated servers or domain names.