Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

erlang: UNIX domain socket support?

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?

like image 507
jldupont Avatar asked Sep 25 '09 18:09

jldupont


People also ask

Are UNIX domain sockets reliable?

SOCK_DGRAM (compare to UDP) – for a datagram-oriented socket that preserves message boundaries (as on most UNIX implementations, UNIX domain datagram sockets are always reliable and don't reorder datagrams)

Are UNIX sockets blocking?

The traditional UNIX system calls are blocking. For example: accept() blocks the caller until a connection is present. If no messages space is available at the socket to hold the message to be transmitted, then send() normally blocks.

What is the module used for socket programming using UDP in Erlang?

The gen_udp contains the modules in Erlang used for UDP communication.


1 Answers

Erlang/OTP comes with drivers for tcp and udp sockets only. So...

No.

Third part drivers

  • unixdom_drv in http://jungerl.sourceforge.net/
  • uds_dist in the source tree's driver examples
  • procket at https://github.com/msantos/procket
like image 53
Christian Avatar answered Oct 01 '22 23:10

Christian