6.16. unix-stream, unix-dgram: Collecting messages from UNIX domain sockets
unix-dgram() drivers open an
AF_UNIX socket and start listening on it for messages. The
unix-stream() driver is primarily used on Linux and uses
SOCK_STREAM semantics (connection oriented, no messages are lost), while
unix-dgram() is used on BSDs and uses
SOCK_DGRAM semantics: this may result in lost local messages if the system is overloaded.
To avoid denial of service attacks when using connection-oriented protocols, the number of simultaneously accepted connections should be limited. This can be achieved using the
max-connections() parameter. The default value of this parameter is quite strict, you might have to increase it on a busy system.
Both unix-stream and unix-dgram have a single required argument that specifies the filename of the socket to create. For the list of available optional parameters, see Section 6.16.1, unix-stream() and unix-dgram() source options
unix-stream(filename [options]); unix-dgram(filename [options]);