uds_dist (uds_dist v1.0.0)

Copy Markdown View Source

Erlang distribution over Unix domain sockets via the socket module.

See the README for configuration, release integration, platform support, and local development notes.

This module implements the callbacks OTP requires of a custom distribution protocol (listen/1, accept/1, accept_connection/5, setup/5, close/1, select/1, address/0, plus the optional setopts/2, getopts/2). It is loaded by passing -proto_dist uds to the BEAM at boot; the callbacks are invoked by the kernel's distribution machinery, not by user code, and are not documented here.

The implementation is modelled on the erl_uds_dist example in lib/kernel/examples with several simplifications: pure-Erlang via the socket NIF rather than gen_tcp, distribution protocol version 6 only, abstract namespace support on Linux, and socket-path resolution driven by application configuration (the :socket_dir value on the :uds_dist application environment).

The listen backlog is read from the :backlog application environment value at listen/1 time (default 5).