-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: add multicast UDP listener support #412
Conversation
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.
Thanks for this feature, please add some tests for it.
19da5ac
to
8632a30
Compare
Codecov ReportBase: 71.26% // Head: 71.42% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## dev #412 +/- ##
==========================================
+ Coverage 71.26% 71.42% +0.16%
==========================================
Files 13 13
Lines 1392 1428 +36
==========================================
+ Hits 992 1020 +28
- Misses 328 335 +7
- Partials 72 73 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Based on the failures on Linux runners, it seemed that there is no expected loopback interface with multicast support on Github Linux runners, whereas there is on macOS runners, so I assume we need to skip these tests when the OS is Linux? |
a8006c6
to
53a889e
Compare
This reverts commit 53a889e.
Sorry for making so many changes. It is hard to write a test that runs both on Linux and Mac. The interface names and capabilities differ. Eg. the loopback interface name is lo0 and the multicast flag is set on Mac, while it is lo on Linux and the flag is not set. Writing a universal networking library is really hard! My appreciation. |
Don't worry about it, all these commits will be squashed into one commit finally. |
Thanks~ |
1. Are you opening this pull request for bug-fixes, optimizations or new feature?
New feature
2. Please describe how these code changes achieve your intention.
This PR is intended to support UDP multicast listeners. Whenever a user wants to bind to a UDP multicast address one needs to provide additional
setsockopt
calls to make it work.3. Please link to the relevant issues (if any).
4. Which documentation changes (if any) need to be made/updated because of this PR?
Additional configuration option:
WithMuticastInterfaceIndex
.Examples:
or
4. Checklist