ranch.procs.asciidoc 762 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. = ranch:procs(3)
  2. == Name
  3. ranch:procs - Retrieve pids from a listener
  4. == Description
  5. [source,erlang]
  6. ----
  7. procs(Ref :: ranch:ref(),
  8. Type :: acceptors | connections)
  9. -> Pids :: [pid()]
  10. ----
  11. Retrieve pids from a listener.
  12. == Arguments
  13. Ref::
  14. The listener name.
  15. Type::
  16. The type of process that will be returned.
  17. == Return value
  18. A list of pids is returned.
  19. == Examples
  20. .Get the pids of the acceptor processes
  21. [source,erlang]
  22. ----
  23. Pids = ranch:procs(acceptors).
  24. ----
  25. .Get the pids of the connection processes
  26. [source,erlang]
  27. ----
  28. Pids = ranch:procs(connections).
  29. ----
  30. == See also
  31. link:man:ranch:get_addr(3)[ranch:get_addr(3)],
  32. link:man:ranch:get_port(3)[ranch:get_port(3)],
  33. link:man:ranch:info(3)[ranch:info(3)],
  34. link:man:ranch(3)[ranch(3)]