Comments (5)
If anyone is still wondering about this after one year like me :p
It seems that the latest version of the package adds a bind
to options that is used as address in the socket.bind()
call. Setting it to 0.0.0.0
seems to fix the problem.
from multicast-dns.
I ran into something similar in a situation where I did need to use options.interface
. options.interface
is used in two places β I am not sure it needs to be used in both.
It is used not only to override the default interface (automatic selection of default interface does not do great in complex network environments βΒ at least in my case it generally picks the wrong interface) but also to bind. If I do specify an interface I get EADDRINUSE
, I guess because I also have mDNSResponder running. I ended up just removing the reference to opts.interface from bind
and it seems to work just fine β dns-sd
shows me that multicast-dns
has registered on the correct interface and bind
works just as it did if I hadn't specified options.interface
.
The change I made was specifically to comment out opts.interface here:
socket.bind(port, undefined /* opts.interface */, function () {
from multicast-dns.
I just ran into this issue and @nriley 's solution resolved it.
@mafintosh Would you be open to a PR that adds a new localAddress
option which will be used in .bind()
instead of opts.interface
? This would be a major version change.
from multicast-dns.
I also have a problem that, if I parameter interface with my ip address to select the right interface, I receive multicast udp packets with this address, I must remove "opts.interface" from the bind command to receive all multicast udp packets of all my clients
by putting "ip" instead of "opts.interface" it works for the multicast
from multicast-dns.
If anyone is still wondering about this after one year like me :p
It seems that the latest version of the package adds a
bind
to options that is used as address in thesocket.bind()
call. Setting it to0.0.0.0
seems to fix the problem.
Thanks!
require("multicast-dns")({bind: "0.0.0.0", interface:"192.168.1.1"});
from multicast-dns.
Related Issues (20)
- How can I run mdns again after I do mdns.destroy(); HOT 2
- Appveyor not enabled HOT 1
- How to make a new instance of mdns ? HOT 2
- Automatic ipv6 support? HOT 1
- cli --announce doesn't work
- On windows listener is not working HOT 1
- Unable to use it with react native ! HOT 1
- Detect services on two interfaces? HOT 2
- type is always 'query'? HOT 1
- Running in Docker/Kubernetes HOT 2
- CVE-2021-23386: update dns-packet HOT 2
- v6: CVE-2021-23386: update dns-packet HOT 10
- dgram.createSocket is not a function HOT 4
- Server crashing on setMulticastInterface throwing EADDRNOTAVAIL HOT 1
- Multicast with VLAN does not see responses HOT 1
- allInterfaces - won't work with nodejs version 18. HOT 2
- macOS: Cannot decode name (bad pointer) HOT 1
- It is possible to send a query with question of record type "ANY"?
- Feature request HOT 3
- Fails to parse larger responses HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from multicast-dns.