---
title: "unix-stream, unix-dgram: Send messages to UNIX domain sockets"
url: "https://axoflow.com/docs/axosyslog-core/4.28/chapter-destinations/configuring-destinations-unixstream/"
last_modified: "2023-10-29T10:05:55+01:00"
---

> For the complete documentation index, see [llms.txt](https://axoflow.com/docs/axosyslog-core/4.28/llms.txt).

# unix-stream, unix-dgram: Send messages to UNIX domain sockets

The `unix-stream()` and `unix-dgram()` drivers send messages to a UNIX domain socket in either `SOCK_STREAM` or `SOCK_DGRAM` mode.

Both drivers have a single required argument specifying the name of the socket to connect to. For the list of available optional parameters, see [unix-stream() and unix-dgram() destination options](https://axoflow.com/docs/axosyslog-core/4.28/chapter-destinations/configuring-destinations-unixstream/reference-destination-unixstream/index.md).

## Declaration:

```shell
   unix-stream(filename [options]);
    unix-dgram(filename [options]);
```

## Example: Using the unix-stream() driver

```shell
   destination d_unix_stream { unix-stream("/var/run/logs"); };
```

---

[unix-stream() and unix-dgram() destination options](https://axoflow.com/docs/axosyslog-core/4.28/chapter-destinations/configuring-destinations-unixstream/reference-destination-unixstream/index.md)

Last modified October 29, 2023: [Create manpages (#34) (9534f54e)](https://github.com/axoflow/axosyslog-core-docs/commit/9534f54ee9e0cc76cb336c0c01f2e1973760d0e0)
