Unix sockets are UDP-esque, not TCP.#6
Unix sockets are UDP-esque, not TCP.#6robholland wants to merge 10 commits intocloudflare:masterfrom
Conversation
syslog expects that it will receive one message per datagram, so we can't send arbitrary amounts of data from a buffer as we do for TCP. This change iterates over the log lines and sends each one on it's own.
|
@robholland There are two different types of unix domain sockets, |
|
Ok, I'll change the code to be enabled by a datagram option, rather than presuming that to be the case based on the presence of path. |
This allows people to still use SOCK_STREAM style unix sockets. Please note I haven't tested SOCK_STREAM sockets, so that will work as well as it did (or not) regardless of this patch :)
|
|
Ok, I'll take a look at that branch, thanks. I'll also test plain UDP. |
Conflicts: lib/resty/logger/socket.lua
…ix_socket Conflicts: lib/resty/logger/socket.lua
|
This code currently reads ok to me, but testing in production it's behaving strangely in datagram mode, both connected to a unix domain socket and plain UDP. I'll do more testing tomorrow. |
|
The cosocket has already support udp unix socket. I think PR #20 fixed this. |
No description provided.