-
Notifications
You must be signed in to change notification settings - Fork 83
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
sa,unixsock: add unix domain socket support #600
Conversation
f720686
to
60aa8a3
Compare
2745005
to
5575865
Compare
perhaps also update the list of modules: |
b94e470
to
f639366
Compare
f639366
to
c19fd23
Compare
@@ -108,6 +108,11 @@ int sa_pton(const char *addr, struct sa *sa) | |||
if (inet_pton(AF_INET, addr, &sa->u.in.sin_addr) > 0) { | |||
sa->u.in.sin_family = AF_INET; | |||
} | |||
else if (!strncmp(addr, "unix:", 5)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if the string is 5 bytes ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the provided addr
string should be always zero terminated, sun_path is empty in this case too.
11db4fa
to
f7b87b7
Compare
c131f4c
to
0237d26
Compare
0237d26
to
3a5e67e
Compare
I think this looks good now. Please go ahead and merge, if you want |
Usage example: