Skip to content

Enable socket.reuse_address in MDNS::Server so it plays nicely with other multicast clients #3

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

Merged
merged 1 commit into from
Jan 11, 2023

Conversation

compumike
Copy link
Contributor

I had to enable @socket.reuse_address = true. Otherwise I would get:

Unhandled exception: Could not bind to '0.0.0.0:5353': Address in use (Socket::BindError)

presumably because I have other programs listening to port 5353, including avahi-daemon on my computer.

Per this document, "[with SO_REUSEADDR] every incoming multicast or broadcast UDP datagram destined to the shared port is delivered to all sockets bound to the port."

Works now! 😄

@stakach stakach merged commit 9e990bf into spider-gazelle:master Jan 11, 2023
@stakach
Copy link
Member

stakach commented Jan 11, 2023

Thanks!

@stakach
Copy link
Member

stakach commented Jan 11, 2023

pushed a new version: v1.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants