mcuadros / go-syslog

Syslog server library for go.
http://godoc.org/gopkg.in/mcuadros/go-syslog.v2
MIT License
523 stars 143 forks source link

Add support for regular UNIX sockets #35

Closed kvs closed 8 years ago

kvs commented 8 years ago

Add support for creating a listener on a regular UNIX domain socket.

Not sure if I'm missing something, since I've never used datagram sockets before, and syslog-things usually expect domain sockets.

mcuadros commented 8 years ago

can you provide a small test for it? thanks

mcuadros commented 8 years ago

ping @kvs

kvs commented 8 years ago

@mcuadros sorry, was working on it (my Go-skills are a bit rough), but it seems this doesn't work entirely cleanly with the latest version. I had just rebased from an old version prior to the datagram-channel stuff.

In the meantime, I've also found out I didn't know domain sockets very well. Turns out, there's stream, packet and datagram. glibc tries datagram then stream, whereas Go is more explicit, which is why this seemed to be necessary. Knowing this, I've successfully gotten our stuff to work using the unixgram-version, and I'm not skilled enough to quickly whip up some tests verifying if stream-mode will work in go-syslog, so I'm gonna close this up. Sorry for the noise!