Is there a way to access UNIX domain sockets (e.g. /var/run/dbus/system_bus_socket ) directly from Erlang without resorting to a third-party driver?
The nanomsg library supports Unix domain sockets, and the enm driver provides an Erlang language binding for nanomsg.
For example, to open the response side of a request/response protocol and bind to a Unix domain socket address:
Url = "ipc:///path/to/socket/file",
{ok,Rep} = enm:rep([{bind,Url}]),
Here, Rep is a nanomsg socket. It supports send and recv as well as all the usual Erlang {active, true | false | N} modes, etc. that regular Erlang TCP/SCTP/UDP sockets provide. For more details consult the enm github README.