-
Notifications
You must be signed in to change notification settings - Fork 31
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
RFC: support other protocol families #17
base: master
Are you sure you want to change the base?
Conversation
s.sun_family = AF_UNIX; | ||
assert(node::Buffer::HasInstance(buf)); | ||
|
||
s = reinterpret_cast<sockaddr*>(node::Buffer::Data(buf)); |
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.
const sockaddr*
?
@bnoordhuis done. Thanks for the review. Does this change make sense to you? When I find a satisfactory way to handle the reception will come back here. |
If you're asking if I object to it, I don't. :-) Apropos style, can you wrap long lines at 80 columns? Cheers. |
|
Wrapped to 80 and rebased to master |
@bnoordhuis Reception implementation. |
rebased to current master |
Sorry, I've completely forgotten about this. I don't have much time to work on this module but if you want, I'll make you a collaborator. |
@bnoordhuis Thanks for the offer. ATM I don't have time to work on this functionality but can help maintaining this module if you think you need some help. |
More maintainers can't hurt. I'll add you to the repo. If you give me your npm handle, I'll give you publish rights as well. |
npm handle: |
Done. |
I'm studying how to modify this module to support other protocol families apart from
AF_UNIX
while still usingSOCK_DGRAM
. I have 2 options: 1) copy most of the code from this module and replace the functionality related to AF_UNIX . 2) Try to make most of the code independent of the protocol family so any protocol family can easily be added.Does this sound reasonable? Does trying #2 make any sense?
In this PR I've tried to accomplish this for bind, connect and sendto. I'm still trying to figure out a simple way to implement the reception. What do you think?
Thanks