ranch:resume_listener(3)

NAME

ranch:resume_listener - Resume a suspended listener

DESCRIPTION
    resume_listener(Ref :: ranch_ref())
        -> ok | {error, any()}

Resume a suspended listener.

Ranch will start listening for and accepting connections again. The function ranch:set_transport_options(3) can be used to change the transport options before resuming the listener.

Nothing is done when the listener is already running.

ARGUMENTS

Ref
    The listener name.

RETURN VALUE

The atom ok is returned on success.

An error tuple is returned when the listener could not be restarted.

CHANGELOG
    • 1.6: Function introduced.

EXAMPLES

Resume a listener
    ok = ranch:resume_listener(example).

SEE ALSO

ranch:start_listener(3), ranch:stop_listener(3), ranch:suspend_listener(3), ranch:get_status(3), ranch:set_transport_options(3), ranch:wait_for_connections(3), ranch(3)