ranch:procs(3)

Name

ranch:procs - Retrieve pids from a listener

Description

procs(Ref  :: ranch:ref(),
      Type :: acceptors | connections)
    -> Pids :: [pid()]

Retrieve pids from a listener.

Arguments

Ref

The listener name.

Type

The type of process that will be returned.

Return value

A list of pids is returned.

Examples

Get the pids of the acceptor processes
Pids = ranch:procs(acceptors).
Get the pids of the connection processes
Pids = ranch:procs(connections).

See also

ranch:get_addr(3), ranch:get_port(3), ranch:info(3), ranch(3)

Ranch 2.1 Function Reference

Navigation

Version select

Like my work? Donate!

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.