Skip to content
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

Add multicast support to UDPSocket on Windows #13325

Merged
merged 4 commits into from
Apr 24, 2023

Conversation

stakach
Copy link
Contributor

@stakach stakach commented Apr 16, 2023

Comments inline for where I got the documentation
Also cross referenced with the rust documentation for constant values as MS has two definitions, used ws2 defs

@stakach
Copy link
Contributor Author

stakach commented Apr 16, 2023

So weirdly specs pass on the previous commit.
Not sure why they didn't pass on the crystal tool format commit

image

image

@straight-shoota
Copy link
Member

I'm rerunning them. Maybe it's just a fluke? We've experienced some random failures with network specs before.

@stakach
Copy link
Contributor Author

stakach commented Apr 16, 2023

rerunning them worked, probably overlapping as they hadn't completed when the next test run started

@HertzDevil
Copy link
Contributor

IP_MULTICAST_LOOP behaves differently between Windows and Unix-like systems. How much of that affects UDPSocket on Windows?

@stakach
Copy link
Contributor Author

stakach commented Apr 17, 2023

@HertzDevil Practically I don't think it matters much, typically you are using multicast to send data somewhere else. Loopback is really only used if you as the sender want to process the data being sent so you can separate your producers and consumers.

If you have two apps multicasting on the same machine using the same port then you have to enable loopback on both of them for cross platform compatibility. Unusual edge case I guess, but probably rare you'd ever have a setup like this and not enable loopback on both processes.

@straight-shoota straight-shoota added this to the 1.9.0 milestone Apr 21, 2023
@straight-shoota straight-shoota merged commit 264daee into crystal-lang:master Apr 24, 2023
@straight-shoota straight-shoota changed the title add multicast support to win32 target Add multicast support to win32 target Apr 24, 2023
@straight-shoota straight-shoota changed the title Add multicast support to win32 target Add multicast support to UDPSocket on Windows Jul 10, 2023
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants