-
Notifications
You must be signed in to change notification settings - Fork 131
Unix sockets are UDP-esque, not TCP. #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.