| 1 |
= ranch(7) |
| 2 |
|
| 3 |
== Name |
| 4 |
|
| 5 |
ranch - Socket acceptor pool for TCP protocols |
| 6 |
|
| 7 |
== Description |
| 8 |
|
| 9 |
Ranch is a socket acceptor pool for TCP protocols. |
| 10 |
|
| 11 |
Ranch manages listeners which are a set of processes that |
| 12 |
accept and manage connections. The connection's transport |
| 13 |
and protocol modules are configured per listener. Listeners |
| 14 |
can be inspected and reconfigured without interruptions in |
| 15 |
service. |
| 16 |
|
| 17 |
== Modules |
| 18 |
|
| 19 |
Functions: |
| 20 |
|
| 21 |
* link:man:ranch(3)[ranch(3)] - Socket acceptor pool |
| 22 |
* link:man:ranch_proxy_header(3)[ranch_proxy_header(3)] - PROXY protocol |
| 23 |
|
| 24 |
Transports: |
| 25 |
|
| 26 |
* link:man:ranch_ssl(3)[ranch_ssl(3)] - SSL transport |
| 27 |
* link:man:ranch_tcp(3)[ranch_tcp(3)] - TCP transport |
| 28 |
|
| 29 |
Behaviors: |
| 30 |
|
| 31 |
* link:man:ranch_protocol(3)[ranch_protocol(3)] - Protocol modules |
| 32 |
* link:man:ranch_transport(3)[ranch_transport(3)] - Transport modules |
| 33 |
|
| 34 |
== Dependencies |
| 35 |
|
| 36 |
* ssl - Secure communication over sockets |
| 37 |
|
| 38 |
All these applications must be started before the `ranch` |
| 39 |
application. To start Ranch and all dependencies at once: |
| 40 |
|
| 41 |
[source,erlang] |
| 42 |
---- |
| 43 |
{ok, _} = application:ensure_all_started(ranch). |
| 44 |
---- |
| 45 |
|
| 46 |
== Environment |
| 47 |
|
| 48 |
The `ranch` application defines one application environment |
| 49 |
configuration parameter. |
| 50 |
|
| 51 |
profile (false):: |
| 52 |
|
| 53 |
When enabled, Ranch will start `eprof` profiling automatically. |
| 54 |
+ |
| 55 |
You can use the `ranch_app:profile_output/0` function to stop |
| 56 |
profiling and output the results to the files 'procs.profile' |
| 57 |
and 'total.profile'. Do not use in production. |
| 58 |
|
| 59 |
== See also |
| 60 |
|
| 61 |
ssl(7) |